
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>一、原理知识 · 计算机笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="海拉尔的三角">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-pro-fixed/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-ancre-navigation/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-insert-logo-link-website/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism-tomorrow.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-lightbox/css/lightbox.min.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-auto-scroll-table/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-katex-pro/katex.min.css">
                
            
                
                <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-sectionx/sectionx.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-terminull-light/terminull.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="command_withNum.html" />
    
    
    <link rel="prev" href="../linux.html" />
    

    
        <link rel="shortcut icon" href="image/ico.png" type="image/x-icon">
    
    
    
    
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="image/ico.png">
    
    
        
    
    
        
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://github.com/spite-triangle" target="_blank" class="custom-link">Github</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../../cpp/cpp.html">
            
                <a href="../../cpp/cpp.html">
            
                    
                    C/C++
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="../../cpp/chapter/foundation_withNum.html">
            
                <a href="../../cpp/chapter/foundation_withNum.html">
            
                    
                    一、基础概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="../../cpp/chapter/keyword_withNum.html">
            
                <a href="../../cpp/chapter/keyword_withNum.html">
            
                    
                    二、关键字
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="../../cpp/chapter/point_reference_withNum.html">
            
                <a href="../../cpp/chapter/point_reference_withNum.html">
            
                    
                    三、指针与引用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="../../cpp/chapter/oop_withNum.html">
            
                <a href="../../cpp/chapter/oop_withNum.html">
            
                    
                    四、面向对象
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="../../cpp/chapter/memory_withNum.html">
            
                <a href="../../cpp/chapter/memory_withNum.html">
            
                    
                    五、内存
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="../../cpp/chapter/process_withNum.html">
            
                <a href="../../cpp/chapter/process_withNum.html">
            
                    
                    六、进程与线程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7" data-path="../../cpp/chapter/locks_withNum.html">
            
                <a href="../../cpp/chapter/locks_withNum.html">
            
                    
                    七、锁
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.8" data-path="../../cpp/chapter/stl_withNum.html">
            
                <a href="../../cpp/chapter/stl_withNum.html">
            
                    
                    八、STL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.9" data-path="../../cpp/chapter/dataStruction_withNum.html">
            
                <a href="../../cpp/chapter/dataStruction_withNum.html">
            
                    
                    九、数据结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.10" data-path="../../cpp/chapter/array_list_withNum.html">
            
                <a href="../../cpp/chapter/array_list_withNum.html">
            
                    
                    十、数组链表操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.11" data-path="../../cpp/chapter/find_withNum.html">
            
                <a href="../../cpp/chapter/find_withNum.html">
            
                    
                    十一、目标查找
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.12" data-path="../../cpp/chapter/tree_withNum.html">
            
                <a href="../../cpp/chapter/tree_withNum.html">
            
                    
                    十二、树
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.13" data-path="../../cpp/chapter/binaryTree_withNum.html">
            
                <a href="../../cpp/chapter/binaryTree_withNum.html">
            
                    
                    十三、二叉树
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.14" data-path="../../cpp/chapter/dynamicProgram_withNum.html">
            
                <a href="../../cpp/chapter/dynamicProgram_withNum.html">
            
                    
                    十四、动态规划
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.15" data-path="../../cpp/chapter/backtracking_withNum.html">
            
                <a href="../../cpp/chapter/backtracking_withNum.html">
            
                    
                    十五、回溯算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.16" data-path="../../cpp/chapter/monotoneStack_withNum.html">
            
                <a href="../../cpp/chapter/monotoneStack_withNum.html">
            
                    
                    十六、单调栈
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.17" data-path="../../cpp/chapter/toollib_withNum.html">
            
                <a href="../../cpp/chapter/toollib_withNum.html">
            
                    
                    附录 工具库
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../../MySQL/mysql.html">
            
                <a href="../../MySQL/mysql.html">
            
                    
                    MySQL
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="../../MySQL/chapter/introduction_withNum.html">
            
                <a href="../../MySQL/chapter/introduction_withNum.html">
            
                    
                    一、简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="../../MySQL/chapter/foundation_withNum.html">
            
                <a href="../../MySQL/chapter/foundation_withNum.html">
            
                    
                    二、控制台操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="../../MySQL/chapter/operatorDB_withNum.html">
            
                <a href="../../MySQL/chapter/operatorDB_withNum.html">
            
                    
                    三、数据库、表操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.4" data-path="../../MySQL/chapter/operatorData_withNum.html">
            
                <a href="../../MySQL/chapter/operatorData_withNum.html">
            
                    
                    四、数据操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.5" data-path="../../MySQL/chapter/transaction_withNum.html">
            
                <a href="../../MySQL/chapter/transaction_withNum.html">
            
                    
                    五、事务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.6" data-path="../../MySQL/chapter/index_withNum.html">
            
                <a href="../../MySQL/chapter/index_withNum.html">
            
                    
                    六、索引
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.7" data-path="../../MySQL/chapter/authority_withNum.html">
            
                <a href="../../MySQL/chapter/authority_withNum.html">
            
                    
                    七、权限管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.8" data-path="../../MySQL/chapter/backup_withNum.html">
            
                <a href="../../MySQL/chapter/backup_withNum.html">
            
                    
                    八、备份
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../linux.html">
            
                <a href="../linux.html">
            
                    
                    Linux
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="4.1.1" data-path="foundation_withNum.html">
            
                <a href="foundation_withNum.html">
            
                    
                    一、原理知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.2" data-path="command_withNum.html">
            
                <a href="command_withNum.html">
            
                    
                    二、指令
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../../tcp_udp/tcp_upd.html">
            
                <a href="../../tcp_udp/tcp_upd.html">
            
                    
                    网络
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1.1" data-path="../../tcp_udp/chapter/foundation_withNum.html">
            
                <a href="../../tcp_udp/chapter/foundation_withNum.html">
            
                    
                    一、网络通讯基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.2" data-path="../../tcp_udp/chapter/tcp_udp_withNum.html">
            
                <a href="../../tcp_udp/chapter/tcp_udp_withNum.html">
            
                    
                    二、tcp/udp
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >一、原理知识</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-anchor"></i><ul><li><span class="title-icon "></span><a href="#&#x539F;&#x7406;&#x4ECB;&#x7ECD;"><b></b>&#x539F;&#x7406;&#x4ECB;&#x7ECD;</a></li><li><span class="title-icon "></span><a href="#1-linux-&#x7B80;&#x4ECB;"><b></b>1. Linux &#x7B80;&#x4ECB;</a></li><ul><li><span class="title-icon "></span><a href="#11-linux-&#x7CFB;&#x7EDF;&#x7ED3;&#x6784;"><b></b>1.1. Linux &#x7CFB;&#x7EDF;&#x7ED3;&#x6784;</a></li><li><span class="title-icon "></span><a href="#12-&#x5185;&#x6838;"><b></b>1.2. &#x5185;&#x6838;</a></li><li><span class="title-icon "></span><a href="#13-&#x5185;&#x5B58;&#x7BA1;&#x7406;"><b></b>1.3. &#x5185;&#x5B58;&#x7BA1;&#x7406;</a></li><li><span class="title-icon "></span><a href="#14-&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x7BA1;&#x7406;"><b></b>1.4. &#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x7BA1;&#x7406;</a></li><li><span class="title-icon "></span><a href="#15-&#x786C;&#x4EF6;&#x8BBE;&#x5907;&#x7BA1;&#x7406;"><b></b>1.5. &#x786C;&#x4EF6;&#x8BBE;&#x5907;&#x7BA1;&#x7406;</a></li><li><span class="title-icon "></span><a href="#16-&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7BA1;&#x7406;"><b></b>1.6. &#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7BA1;&#x7406;</a></li></ul><li><span class="title-icon "></span><a href="#2-linux&#x7684;&#x542F;&#x52A8;&#x8FC7;&#x7A0B;"><b></b>2. linux&#x7684;&#x542F;&#x52A8;&#x8FC7;&#x7A0B;</a></li><li><span class="title-icon "></span><a href="#3-&#x6587;&#x4EF6;"><b></b>3. &#x6587;&#x4EF6;</a></li><ul><li><span class="title-icon "></span><a href="#31-&#x6982;&#x5FF5;"><b></b>3.1. &#x6982;&#x5FF5;</a></li><li><span class="title-icon "></span><a href="#32-&#x6587;&#x4EF6;&#x5C5E;&#x6027;"><b></b>3.2. &#x6587;&#x4EF6;&#x5C5E;&#x6027;</a></li><li><span class="title-icon "></span><a href="#33-&#x4E03;&#x79CD;&#x6587;&#x4EF6;&#x7C7B;&#x578B;"><b></b>3.3. &#x4E03;&#x79CD;&#x6587;&#x4EF6;&#x7C7B;&#x578B;</a></li><li><span class="title-icon "></span><a href="#34-&#x6587;&#x4EF6;&#x6743;&#x9650;"><b></b>3.4. &#x6587;&#x4EF6;&#x6743;&#x9650;</a></li><li><span class="title-icon "></span><a href="#35-&#x6587;&#x4EF6;&#x65F6;&#x95F4;&#x6233;"><b></b>3.5. &#x6587;&#x4EF6;&#x65F6;&#x95F4;&#x6233;</a></li><li><span class="title-icon "></span><a href="#36-&#x76EE;&#x5F55;&#x7684;&#x7ED3;&#x6784;"><b></b>3.6. &#x76EE;&#x5F55;&#x7684;&#x7ED3;&#x6784;</a></li></ul><li><span class="title-icon "></span><a href="#4-&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x4E0E;&#x8FDB;&#x7A0B;"><b></b>4. &#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x4E0E;&#x8FDB;&#x7A0B;</a></li><ul><li><span class="title-icon "></span><a href="#41-&#x8FDB;&#x7A0B;"><b></b>4.1. &#x8FDB;&#x7A0B;</a></li><li><span class="title-icon "></span><a href="#42-&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;"><b></b>4.2. &#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;</a></li><li><span class="title-icon "></span><a href="#43-&#x91CD;&#x5B9A;&#x5411;"><b></b>4.3. &#x91CD;&#x5B9A;&#x5411;</a></li><li><span class="title-icon "></span><a href="#44-&#x4ED6;&#x4F4D;&#x7F6E;&#x7684;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;"><b></b>4.4. &#x4ED6;&#x4F4D;&#x7F6E;&#x7684;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;</a></li></ul><li><span class="title-icon "></span><a href="#5-&#x73AF;&#x5883;&#x53D8;&#x91CF;"><b></b>5. &#x73AF;&#x5883;&#x53D8;&#x91CF;</a></li><ul><li><span class="title-icon "></span><a href="#51-&#x5B9A;&#x4E49;"><b></b>5.1. &#x5B9A;&#x4E49;</a></li><li><span class="title-icon "></span><a href="#52-&#x67E5;&#x770B;"><b></b>5.2. &#x67E5;&#x770B;</a></li><li><span class="title-icon "></span><a href="#53-&#x521B;&#x5EFA;"><b></b>5.3. &#x521B;&#x5EFA;</a></li></ul><li><span class="title-icon "></span><a href="#6-crontab&#x5B9A;&#x65F6;"><b></b>6. crontab&#x5B9A;&#x65F6;</a></li><ul><li><span class="title-icon "></span><a href="#61-&#x7B80;&#x4ECB;"><b></b>6.1. &#x7B80;&#x4ECB;</a></li><li><span class="title-icon "></span><a href="#62-&#x914D;&#x7F6E;"><b></b>6.2. &#x914D;&#x7F6E;</a></li></ul><li><span class="title-icon "></span><a href="#7-&#x6302;&#x8F7D;"><b></b>7. &#x6302;&#x8F7D;</a></li></ul></div><a href="#&#x539F;&#x7406;&#x4ECB;&#x7ECD;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 style="font-size:60px;text-align:center;" id="&#x539F;&#x7406;&#x4ECB;&#x7ECD;"><a name="&#x539F;&#x7406;&#x4ECB;&#x7ECD;" class="anchor-navigation-ex-anchor" href="#&#x539F;&#x7406;&#x4ECB;&#x7ECD;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x539F;&#x7406;&#x4ECB;&#x7ECD;</h1>

<h1 id="1-linux-&#x7B80;&#x4ECB;"><a name="1-linux-&#x7B80;&#x4ECB;" class="anchor-navigation-ex-anchor" href="#1-linux-&#x7B80;&#x4ECB;"><i class="fa fa-link" aria-hidden="true"></i></a>1. <code>Linux</code> &#x7B80;&#x4ECB;</h1>
<h2 id="11-linux-&#x7CFB;&#x7EDF;&#x7ED3;&#x6784;"><a name="11-linux-&#x7CFB;&#x7EDF;&#x7ED3;&#x6784;" class="anchor-navigation-ex-anchor" href="#11-linux-&#x7CFB;&#x7EDF;&#x7ED3;&#x6784;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1. <code>Linux</code> &#x7CFB;&#x7EDF;&#x7ED3;&#x6784;</h2>
<p>&#x53C2;&#x8003;&#x535A;&#x5BA2;&#xFF1A;</p>
<ul>
<li><a href="https://zhuanlan.zhihu.com/p/343597285" target="_blank">&#x7528;&#x6237;&#x7A7A;&#x95F4;&#x548C;&#x5185;&#x6838;&#x7A7A;&#x95F4;&#x7684;&#x533A;&#x522B;</a></li>
</ul>
<p style="text-align:center;"><a href="../../image/linux/linuxStructure.png" data-lightbox="6b25dbec-1f2c-49e6-a91d-0b5a01555743" data-title="undefined"><img src="../../image/linux/linuxStructure.png" alt="undefined"></a></p>

<p><span style="font-size:24px;font-weight:bold" class="section2"><code>Linux</code>&#x7CFB;&#x7ED3;&#x7ED3;&#x6784;:</span></p>
<ul>
<li><strong>&#x7528;&#x6237;&#x7A7A;&#x95F4;(User Space)</strong> &#xFF1A;&#x7528;&#x6237;&#x7A7A;&#x95F4;&#x53C8;&#x5305;&#x62EC;&#x7528;&#x6237;&#x7684;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;<code>(User Applications)</code>&#x3001;C &#x5E93;<code>(C Library)</code></li>
<li><strong>&#x5185;&#x6838;&#x7A7A;&#x95F4;(Kernel Space)</strong> &#xFF1A;&#x5185;&#x6838;&#x7A7A;&#x95F4;&#x53C8;&#x5305;&#x62EC;&#x7CFB;&#x7EDF;&#x8C03;&#x7528;&#x63A5;&#x53E3;<code>(System Call Interface)</code>&#x3001;&#x5185;&#x6838;<code>(Kernel)</code>&#x3001;&#x5E73;&#x53F0;&#x67B6;&#x6784;&#x76F8;&#x5173;&#x7684;&#x4EE3;&#x7801;<code>(Architecture-Dependent Kernel Code)</code>&#x3002;</li>
</ul>
<p><strong>&#x539F;&#x56E0;&#xFF1A;</strong></p>
<ul>
<li>&#x73B0;&#x4EE3; <code>CPU</code> &#x5B9E;&#x73B0;&#x4E86;&#x4E0D;&#x540C;&#x7684;&#x5DE5;&#x4F5C;&#x6A21;&#x5F0F;&#xFF0C;&#x4E0D;&#x540C;&#x6A21;&#x5F0F;&#x4E0B; <code>CPU</code> &#x53EF;&#x4EE5;&#x6267;&#x884C;&#x7684;&#x6307;&#x4EE4;&#x548C;&#x8BBF;&#x95EE;&#x7684;&#x5BC4;&#x5B58;&#x5668;&#x4E0D;&#x540C;&#x3002;</li>
<li><code>Linux</code> &#x4ECE; <code>CPU</code> &#x7684;&#x89D2;&#x5EA6;&#x51FA;&#x53D1;&#xFF0C;&#x4E3A;&#x4E86;&#x4FDD;&#x62A4;&#x5185;&#x6838;&#x7684;&#x5B89;&#x5168;&#xFF0C;&#x628A;&#x7CFB;&#x7EDF;&#x5206;&#x6210;&#x4E86;&#x4E24;&#x90E8;&#x5206;&#xFF0C;&#x9632;&#x6B62;&#x7528;&#x6237;&#x7A0B;&#x5E8F;&#x4E0D;&#x7A33;&#x5B9A;&#x628A;&#x7CFB;&#x7EDF;&#x7ED9;&#x641E;&#x5D29;&#x6E83;&#x3002;</li>
</ul>
<p><span style="font-size:24px;font-weight:bold" class="section2">1. &#x8FDB;&#x7A0B;&#x3001;&#x5185;&#x5B58;&#xFF1A;</span></p>
<ul>
<li><strong>&#x5185;&#x5B58;&#x5206;&#x914D;</strong>&#xFF1A;&#x6839;&#x636E;&#x7ED3;&#x6784;&#x4E0A;&#x7684;&#x533A;&#x5206;&#xFF0C;&#x5185;&#x5B58;&#x88AB;&#x5206;&#x4E3A;&#x4E86;&#x4E24;&#x5927;&#x5757;&#xFF0C;&#x4E24;&#x4E2A;&#x7A7A;&#x95F4;&#x6709;&#x7740;&#x5404;&#x81EA;&#x7684;&#x5185;&#x5B58;&#x533A;&#x57DF;&#x3002;</li>
<li><strong>&#x5185;&#x6838;&#x6001;: &#x5F53;&#x8FDB;&#x7A0B;/&#x7EBF;&#x7A0B;&#x8FD0;&#x884C;&#x5728;&#x300C;&#x5185;&#x6838;&#x7A7A;&#x95F4;&#x300D;&#x65F6;&#x5C31;&#x5904;&#x4E8E;&#x300C;&#x5185;&#x6838;&#x6001;&#x300D;&#x3002;</strong><ul>
<li><code>CPU</code>&#x53EF;&#x4EE5;&#x6267;&#x884C;&#x4EFB;&#x4F55;&#x6307;&#x4EE4;</li>
<li>&#x4EE3;&#x7801;&#x4E0D;&#x53D7;&#x4EFB;&#x4F55;&#x7684;&#x9650;&#x5236;&#xFF0C;&#x53EF;&#x4EE5;&#x81EA;&#x7531;&#x5730;&#x8BBF;&#x95EE;&#x4EFB;&#x4F55;&#x6709;&#x6548;&#x5730;&#x5740;</li>
<li>&#x4EE3;&#x7801;&#x4E5F;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x8FDB;&#x884C;&#x7AEF;&#x53E3;&#x7684;&#x8BBF;&#x95EE;</li>
</ul>
</li>
<li><strong>&#x7528;&#x6237;&#x6001;: &#x5F53;&#x8FDB;&#x7A0B;/&#x7EBF;&#x7A0B;&#x8FD0;&#x884C;&#x5728;&#x300C;&#x7528;&#x6237;&#x7A7A;&#x95F4;&#x300D;&#x65F6;&#x5219;&#x5904;&#x4E8E;&#x300C;&#x7528;&#x6237;&#x6001;&#x300D;&#x3002;</strong><ul>
<li>&#x4EE3;&#x7801;&#x6267;&#x884C;&#x8981;&#x53D7;&#x5230; <code>CPU</code>&#x7684;&#x5F88;&#x591A;&#x68C0;&#x67E5;</li>
<li>&#x8BBF;&#x95EE;&#x5185;&#x5B58;&#x5730;&#x5740;&#x53D7;&#x9650;&#x5236;&#xFF0C;&#x6BD4;&#x5982;&#xFF1A;&#x8FDB;&#x7A0B;&#x53EA;&#x80FD;&#x8BBF;&#x95EE;&#x6620;&#x5C04;&#x5176;&#x5730;&#x5740;&#x7A7A;&#x95F4;&#x7684;&#x9875;&#x8868;&#x9879;&#x4E2D;&#x89C4;&#x5B9A;&#x7684;&#x5728;&#x7528;&#x6237;&#x6001;&#x4E0B;&#x53EF;&#x8BBF;&#x95EE;&#x9875;&#x9762;&#x7684;&#x865A;&#x62DF;&#x5730;&#x5740;&#x3002;</li>
</ul>
</li>
<li><span style="color:red;font-weight:bold"> &#x6240;&#x6709;&#x7CFB;&#x7EDF;&#x8D44;&#x6E90;&#x7684;&#x7BA1;&#x7406;&#x90FD;&#x662F;&#x5728;&#x300C;&#x5185;&#x6838;&#x6001;&#x300D;&#x6267;&#x884C;&#x3002; </span></li>
</ul>
<p style="text-align:center;"><a href="../../image/cpp/allmemory.png" data-lightbox="0d10762c-17c8-428a-a4cf-58dfd7fe05af" data-title="undefined"><img src="../../image/cpp/allmemory.png" alt="undefined"></a></p>

<p><span style="font-size:24px;font-weight:bold" class="section2">2. &#x7528;&#x6237;&#x6001;&#x5207;&#x6362;&#x5230;&#x5185;&#x6838;&#x6001;</span></p>
<p><strong>&#x539F;&#x56E0;&#xFF1A;</strong></p>
<p>&#x6240;&#x6709;&#x7CFB;&#x7EDF;&#x8D44;&#x6E90;&#x7684;&#x7BA1;&#x7406;&#x901A;&#x8FC7;&#x5185;&#x6838;&#x6001;&#x5B8C;&#x6210;&#xFF0C;&#x90A3;&#x6211;&#x4EEC;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x9700;&#x8981;&#x8BBF;&#x95EE;&#x78C1;&#x76D8;&#xFF0C;&#x8BFB;&#x53D6;&#x7F51;&#x5361;&#x7684;&#x6570;&#x636E;&#xFF0C;&#x65B0;&#x5EFA;&#x4E00;&#x4E2A;&#x7EBF;&#x7A0B;&#x90FD;&#x9700;&#x8981;&#x4ECE;&#x300C;&#x7528;&#x6237;&#x6001;&#x300D;&#x5207;&#x6362;&#x5230;&#x300C;&#x5185;&#x5B58;&#x6001;&#x300D;&#x3002;</p>
<p><strong>&#x65B9;&#x5F0F;&#xFF1A;</strong></p>
<ul>
<li><strong>&#x7CFB;&#x7EDF;&#x8C03;&#x7528;:</strong> &#x901A;&#x8FC7;&#x5BF9;&#x7CFB;&#x7EDF;&#x63D0;&#x4F9B;&#x7684;<code>API</code>&#x63A5;&#x53E3;&#x51FD;&#x6570;&#x8FDB;&#x884C;&#x8C03;&#x7528;&#xFF0C;&#x5B8C;&#x6210;&#x4ECE;&#x300C;&#x7528;&#x6237;&#x6001;&#x300D;&#x5207;&#x6362;&#x5230;&#x300C;&#x5185;&#x5B58;&#x6001;&#x300D;&#x3002;</li>
<li><strong>&#x4E2D;&#x65AD;&#xFF1A;</strong> &#x5229;&#x7528;&#x8F6F;&#x4E2D;&#x65AD;<code>init 6</code>&#xFF0C;&#x7528;&#x6237;&#x53EF;&#x4EE5;&#x8FDB;&#x884C;&#x7CFB;&#x7EDF;&#x91CD;&#x542F;&#x3002;<ul>
<li><strong>&#x786C;&#x4E2D;&#x65AD;&#xFF1A;</strong> &#x5916;&#x90E8;&#x786C;&#x4EF6;&#x72B6;&#x6001;&#x53D1;&#x751F;&#x6539;&#x53D8;&#x6240;&#x5F15;&#x8D77;&#x7684;&#x4E2D;&#x65AD;&#xFF1B;&#x4F8B;&#x5982;&#xFF0C;&#x63D2;&#x5165;&#x4E00;&#x4E2A;u&#x76D8;&#xFF0C;&#x7F51;&#x5361;&#x6536;&#x5230;&#x6570;&#x636E;&#x5305;&#x7684;&#x65F6;&#x5019;</li>
<li><strong>&#x8F6F;&#x4E2D;&#x65AD;&#xFF1A;</strong> &#x7531;&#x5F53;&#x524D;&#x8FDB;&#x7A0B;&#x6240;&#x89E6;&#x53D1;&#x7684;&#x4E2D;&#x65AD;&#xFF1B;&#x4F8B;&#x5982;&#xFF0C;<code>init 6</code></li>
</ul>
</li>
</ul>
<table>
<thead>
<tr>
<th>&#x7C7B;&#x578B;</th>
<th>&#x89E6;&#x53D1;</th>
<th>CPU</th>
<th>&#x65F6;&#x95F4;</th>
<th>&#x6848;&#x4F8B;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x786C;&#x4E2D;&#x65AD;</td>
<td>&#x786C;&#x4EF6;&#x89E6;&#x53D1;</td>
<td>&#x9A6C;&#x4E0A;&#x4E2D;&#x65AD;&#x5904;&#x7406;</td>
<td>&#x8F83;&#x77ED;&#x65F6;&#x95F4;&#x5185;&#x5B8C;&#x6210;</td>
<td>&#x63D2;&#x5165;&#x4E00;&#x4E2A;u&#x76D8;</td>
</tr>
<tr>
<td>&#x8F6F;&#x4E2D;&#x65AD;</td>
<td>&#x8FDB;&#x7A0B;&#x89E6;&#x53D1;</td>
<td>&#x4E0D;&#x4E00;&#x5B9A;&#x9A6C;&#x4E0A;&#x8FD0;&#x884C;</td>
<td>&#x5904;&#x7406;&#x65F6;&#x95F4;&#x76F8;&#x5BF9;&#x8F83;&#x957F;</td>
<td><code>init 6</code>&#x91CD;&#x542F;&#x7CFB;&#x7EDF;</td>
</tr>
</tbody>
</table>
<blockquote>
<p>[!tip|style:flat]
<strong>&#x6269;&#x5C55;&#xFF1A;&#x6839;&#x636E;<code>CPU</code>&#x8FD0;&#x884C;&#x60C5;&#x51B5;&#xFF0C;&#x53EF;&#x4EE5;&#x628A;&#x300C;&#x4E2D;&#x65AD;&#x300D;&#x5206;&#x4E3A;&#x300C;&#x5916;&#x4E2D;&#x65AD;&#x300D;&#x4E0E;&#x300C;&#x5185;&#x4E2D;&#x65AD;&#x300D;&#xFF0C;&#x6267;&#x884C;&#x903B;&#x8F91;&#x987A;&#x5E8F;&#x4E00;&#x6837;&#x3002;</strong></p>
<ul>
<li><strong>&#x4E2D;&#x65AD;&#xFF08;&#x5916;&#x4E2D;&#x65AD;&#xFF09;</strong>&#xFF1A;&#x300C;&#x5916;&#x4E2D;&#x65AD;&#x300D;&#x5C31;&#x662F;&#x901A;&#x5E38;&#x6240;&#x8FF0;&#x7684;&#x300C;&#x4E2D;&#x65AD;&#x300D;&#xFF0C;&#x7531;<code>CPU</code>&#x5916;&#x90E8;&#x4E8B;&#x4EF6;&#x6240;&#x89E6;&#x53D1;&#x7684;&#x3002;</li>
<li><strong>&#x5F02;&#x5E38;&#xFF08;&#x5185;&#x4E2D;&#x65AD;&#xFF09;</strong>&#xFF1A;<code>CPU</code>&#x5185;&#x90E8;&#x7A0B;&#x5E8F;&#x8FD0;&#x884C;&#xFF0C;<strong>&#x6307;&#x4EE4;&#x6267;&#x884C;&#x51FA;&#x9519;</strong>&#xFF0C;&#x628A;&#x7A0B;&#x5E8F;&#x73A9;&#x5D29;&#x6E83;&#x4E86;&#x3002;</li>
</ul>
<p>&#x53C2;&#x8003;&#x535A;&#x5BA2;&#xFF1A;<a href="https://blog.csdn.net/qq_29996285/article/details/88078939" target="_blank">&#x4E2D;&#x65AD;&#x4E0E;&#x5F02;&#x5E38;&#x7684;&#x533A;&#x522B;</a></p>
</blockquote>
<h2 id="12-&#x5185;&#x6838;"><a name="12-&#x5185;&#x6838;" class="anchor-navigation-ex-anchor" href="#12-&#x5185;&#x6838;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2. &#x5185;&#x6838;</h2>
<p style="text-align:center;"><a href="../../image/linux/kernel.jpg" data-lightbox="dfbca649-0f0a-4ecf-b09a-1d04337df38a" data-title="undefined"><img src="../../image/linux/kernel.jpg" alt="undefined"></a></p>

<blockquote>
<p>[!note|style:flat]
<strong>&#x4F5C;&#x7528;&#xFF1A;Linux&#x7CFB;&#x7EDF;&#x7684;&#x6838;&#x5FC3;&#x662F;&#x5185;&#x6838;&#xFF08;<code>kernel space</code>&#xFF0C;&#x8FD9;&#x91CC;&#x7684;&#x300C;&#x5185;&#x6838;&#x300D;&#x662F;&#x6307;&#x7684;&#x662F;&#x300C;&#x5185;&#x6838;&#x7A7A;&#x95F4;&#x300D;&#x91CC;&#x9762;&#x7684;&#x4E1C;&#x897F;&#xFF09;&#x3002;&#x5185;&#x6838;&#x63A7;&#x5236;&#x7740;&#x8BA1;&#x7B97;&#x673A;&#x7CFB;&#x7EDF;&#x4E0A;&#x7684;&#x6240;&#x6709;&#x786C;&#x4EF6;&#x548C;&#x8F6F;&#x4EF6;,&#x5728;&#x5FC5;&#x8981;&#x65F6;&#x5206;&#x914D;&#x786C;&#x4EF6;,&#x5E76;&#x6839;&#x636E;&#x9700;&#x8981;&#x6267;&#x884C;&#x8F6F;&#x4EF6;&#x3002;</strong></p>
<ul>
<li><strong>&#x7CFB;&#x7EDF;&#x5185;&#x5B58;&#x7BA1;&#x7406;``</strong></li>
<li><strong>&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x7BA1;&#x7406;</strong></li>
<li><strong>&#x786C;&#x4EF6;&#x8BBE;&#x5907;&#x7BA1;&#x7406;</strong></li>
<li><strong>&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7BA1;&#x7406;</strong></li>
</ul>
</blockquote>
<h2 id="13-&#x5185;&#x5B58;&#x7BA1;&#x7406;"><a name="13-&#x5185;&#x5B58;&#x7BA1;&#x7406;" class="anchor-navigation-ex-anchor" href="#13-&#x5185;&#x5B58;&#x7BA1;&#x7406;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3. &#x5185;&#x5B58;&#x7BA1;&#x7406;</h2>
<p><span style="font-size:24px;font-weight:bold" class="section2">1. MMU &#x5185;&#x5B58;&#x7BA1;&#x7406;&#x5355;&#x5143;</span></p>
<p><strong>&#x4ECB;&#x7ECD;</strong>&#xFF1A; &#x4E00;&#x4E2A;&#x786C;&#x4EF6;&#x82AF;&#x7247;&#xFF0C;&#x7528;&#x6765;&#x5C06;<code>virtual memory</code>&#x6620;&#x5C04;&#x5230;&#x771F;&#x6B63;&#x7684;&#x7269;&#x7406;&#x8BBE;&#x5907;&#x5730;&#x5740;&#x4E0A;&#x3002;<strong>&#x4E5F;&#x5C31;&#x662F;&#x8BF4;<code>CPU</code>&#x662F;&#x901A;&#x8FC7;<code>MMU</code>&#x6765;&#x627E;&#x5230;&#x771F;&#x6B63;&#x7684;&#x5185;&#x5B58;&#x6761;&#xFF0C;&#x786C;&#x76D8;&#xFF0C;&#x663E;&#x5361;&#x7B49;&#x786C;&#x4EF6;&#x7684;&#x4F4D;&#x7F6E;&#x3002;</strong></p>
<p style="text-align:center;"><a href="../../image/linux/mmmu.png" data-lightbox="ced1f0dc-6856-427c-9bb2-4a92c9e32f6b" data-title="undefined"><img src="../../image/linux/mmmu.png" alt="undefined"></a></p>

<p><span style="font-size:24px;font-weight:bold" class="section2">2. virtual memory</span></p>
<p>&#x5BF9;<code>32</code>&#x4F4D;&#x7684;<code>CPU</code>&#x800C;&#x8A00;&#xFF0C;&#x5C31;&#x4F1A;&#x6784;&#x9020;&#x4E00;&#x4E2A;&#x5730;&#x5740;&#x8303;&#x56F4;&#x4E3A;<code>0x00000000 ~ 0xFFFFFFFF</code>&#x7684;&#x300C;&#x865A;&#x62DF;&#x5185;&#x5B58;&#x300D;&#xFF0C;&#x7136;&#x540E;&#x901A;&#x8FC7;<code>Memory Management</code>&#x5C06;&#x7269;&#x7406;&#x5185;&#x5B58;<code>Memory</code>&#xFF08;&#x5185;&#x5B58;&#x6761;&#xFF09;&#x548C;<code>Swap Space</code>&#xFF08;&#x786C;&#x76D8;&#x4E0A;&#x7684;&#x6A21;&#x62DF;&#x5185;&#x5B58;&#xFF09;&#x6620;&#x5C04;&#x5230;&#x865A;&#x62DF;&#x5185;&#x5B58;&#x4E0A;&#xFF0C;&#x540C;&#x6837;&#x8FD8;&#x6709;&#x5176;&#x4ED6;&#x786C;&#x4EF6;&#x7684;&#x53EF;&#x64CD;&#x4F5C;&#x5185;&#x5B58;&#x90FD;&#x6620;&#x5C04;&#x5230;&#x8FD9;&#x4E0A;&#x9762;&#xFF08;&#x4F8B;&#x5982;&#x663E;&#x5B58;&#xFF09;&#x3002;<strong>&#x8FD9;&#x6837;&#x505A;&#x7684;&#x597D;&#x5904;&#x5C31;&#x662F;&#xFF1A;&#x5C06;&#x96F6;&#x788E;&#x7684;&#x53EF;&#x8BBF;&#x95EE;&#x5730;&#x5740;&#x7EDF;&#x4E00;&#x96C6;&#x4E2D;&#x8D77;&#x6765;&#xFF0C;<code>CPU</code>&#x4E2D;&#x7684;&#x6307;&#x4EE4;&#x5C31;&#x53EA;&#x9700;&#x8981;&#x6839;&#x636E;&#x5730;&#x5740;&#x7F16;&#x53F7;<code>0x00000000 ~ 0xFFFFFFFF</code>&#x8BFB;&#x5199;&#x5BF9;&#x5E94;&#x7684;&#x5185;&#x5B58;&#x5C31;&#x884C;&#x4E86;&#xFF0C;&#x5177;&#x4F53;&#x7684;&#x627E;&#x5730;&#x5740;&#x5DE5;&#x4F5C;&#x5C31;&#x4EA4;&#x7ED9;&#x300C;&#x5185;&#x5B58;&#x7BA1;&#x7406;&#x5355;&#x5143;<code>MMU</code>&#x300D;&#x5B8C;&#x6210;&#x3002;</strong></p>
<p style="text-align:center;"><a href="../../image/linux/cpummu.png" data-lightbox="c9e4e790-3664-468b-a955-eb4a6cb2f69d" data-title="undefined"><img src="../../image/linux/cpummu.png" alt="undefined"></a></p>

<blockquote>
<p>[!tip]</p>
<ul>
<li><strong>&#x6211;&#x4EEC;&#x7F16;&#x5199;&#x7684;&#x7A0B;&#x5E8F;&#x90FD;&#x662F;&#x4EE5;<code>virtual memory</code>&#x8FDB;&#x884C;&#x5185;&#x5B58;&#x5BFB;&#x5740;&#x7684;&#xFF0C;&#x8FD0;&#x884C;&#x65F6;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x770B;&#x6210;&#x662F;&#x5728;&#x300C;&#x865A;&#x62DF;&#x5730;&#x5740;&#x7A7A;&#x95F4;&#x300D;&#x4E2D;&#x8FD0;&#x884C;&#x7684;&#x3002;&#x771F;&#x5B9E;&#x7684;&#x7269;&#x7406;&#x5BFB;&#x5740;&#x5219;&#x9760;<code>MMU</code>&#x5B8C;&#x6210;&#x3002;</strong></li>
<li><strong>&#x6BCF;&#x4E2A;&#x8FDB;&#x7A0B;&#x90FD;&#x6709;&#x81EA;&#x5DF1;&#x72EC;&#x7ACB;&#x7684;&#x865A;&#x62DF;&#x5730;&#x5740;&#x7A7A;&#x95F4;&#xFF0C;&#x8FD0;&#x884C;&#x65F6;&#xFF0C;&#x5C31;&#x5C06;&#x865A;&#x62DF;&#x5730;&#x5740;&#x7A7A;&#x95F4;&#x91CC;&#x7684;&#x4EE3;&#x7801;&#x6570;&#x636E;&#x6620;&#x5C04;&#x5230;&#x5185;&#x5B58;&#x4E2D;&#xFF0C;&#x4ECE;&#x800C;&#x88AB;CPU&#x6267;&#x884C;&#x4E0E;&#x5904;&#x7406;&#x3002;</strong></li>
</ul>
<p><span style="color:red;font-weight:bold"> &#x4E0A;&#x56FE;&#x7684;&#x5185;&#x5B58;&#x6620;&#x5C04;&#x662F;&#x4E71;&#x753B;&#x7684;&#xFF0C;&#x771F;&#x5B9E;&#x60C5;&#x51B5;&#x4E0D;&#x77E5;&#x9053;&#xFF08;&#x61D2;&#x5F97;&#x67E5;&#x4E86;&#xFF09; </span></p>
</blockquote>
<p style="text-align:center;"><a href="../../image/linux/processVirtual.png" data-lightbox="46945f79-1fd2-4af2-86d8-aac4e7a97810" data-title="undefined"><img src="../../image/linux/processVirtual.png" alt="undefined"></a></p>

<p><strong>&#x865A;&#x62DF;&#x5185;&#x5B58;&#x7684;&#x5168;&#x5C40;&#x56FE;&#xFF1A;</strong></p>
<p style="text-align:center;"><a href="../../image/cpp/allmemory.png" data-lightbox="a85cb396-f370-44f8-a4b9-4152957cd13b" data-title="undefined"><img src="../../image/cpp/allmemory.png" alt="undefined"></a></p>

<p><strong>&#x4E0B;&#x9762;&#x8FDB;&#x884C;&#x7A0B;&#x5E8F;&#x6D4B;&#x8BD5;&#xFF0C;&#x540C;&#x6837;&#x7684;&#x7A0B;&#x5E8F;&#x540C;&#x65F6;&#x8FD0;&#x884C;&#xFF0C;&#x5176;&#x5185;&#x5B58;&#x5730;&#x5740;&#x662F;&#x4E00;&#x6837;&#x3002;&#x901A;&#x8FC7;<code>MMU</code>&#x5355;&#x5143;&#x7FFB;&#x8BD1;&#x8FC7;&#x540E;&#x7684;&#x7269;&#x7406;&#x5730;&#x5740;&#x4E5F;&#x5E94;&#x8BE5;&#x662F;&#x4E00;&#x6837;&#x7684;&#x3002;&#x300C;&#x8FD9;&#x5C31;&#x4EA7;&#x751F;&#x95EE;&#x9898;&#x4E86;&#xFF0C;&#x540C;&#x65F6;&#x8FD0;&#x884C;&#x7684;&#x7A0B;&#x5E8F;&#xFF0C;&#x5176;&#x6240;&#x5728;&#x7684;&#x5185;&#x5B58;&#x5730;&#x5740;&#x5E94;&#x8BE5;&#x8981;&#x4E0D;&#x4E00;&#x6837;&#x624D;&#x884C;&#x963F;&#x3002;&#x300D;</strong></p>
<p><strong>&#x5728;<code>CPU</code>&#x4E2D;&#x6267;&#x884C;&#x7684;&#x4EE3;&#x7801;&#x53EA;&#x662F;&#x5B8C;&#x6574;&#x7A0B;&#x5E8F;&#x7684;&#x4E00;&#x90E8;&#x5206;</strong>&#xFF0C;&#x5BF9;&#x4E8E;&#x4E0A;&#x9762;&#x6240;&#x9047;&#x5230;&#x7684;&#x4E24;&#x8FDB;&#x7A0B;&#x540C;&#x65F6;&#x8FD0;&#x884C;&#x9020;&#x6210;&#x7684;&#x95EE;&#x9898;&#xFF0C;&#x53EA;&#x8981;&#x7CFB;&#x7EDF;&#x5C06;&#x8FDB;&#x7A0B;&#x8FD0;&#x884C;&#x65F6;&#x95F4;&#x9519;&#x5F00;&#xFF0C;&#x518D;&#x8FD0;&#x884C;&#x5C31;&#x884C;&#x4E86;&#xFF0C;<strong>&#x8868;&#x9762;&#x4E0A;&#x7684;&#x540C;&#x65F6;&#x8FD0;&#x884C;&#xFF0C;&#x5176;&#x5B9E;&#x5BF9;&#x4E8E;<code>CPU</code>&#x800C;&#x8A00;&#x662F;&#x9519;&#x5F00;&#x4E86;&#x7684;&#x3002;</strong></p>
<p><strong>&#x8FDB;&#x7A0B;1&#xFF1A;</strong></p>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">.\a.exe</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`.\a.exe`)"></i>
          <span class="terminullOutput">int address: 000000000061FE1C
double address: 000000000061FE10
&#x4E00;&#x76F4;&#x8FD0;&#x884C;</span>
        
    </div>
</div><p></p>
<p><strong>&#x8FDB;&#x7A0B;2&#xFF1A;</strong></p>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">.\a.exe</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`.\a.exe`)"></i>
          <span class="terminullOutput">int address: 000000000061FE1C
double address: 000000000061FE10
&#x4E00;&#x76F4;&#x8FD0;&#x884C;</span>
        
    </div>
</div><p></p>
<sec data-title="&#x6D4B;&#x8BD5;&#x4EE3;&#x7801;" data-id="virtualMemory" data-show="true" data-collapse="true"><div class="panel panel-default"><div class="panel-heading"><b>&#x6D4B;&#x8BD5;&#x4EE3;&#x7801;<a class="pull-right section atTitle btn btn-default" target="virtualMemory"><span class="fa fa-angle-up"></span></a></b></div><div class="panel-collapse in" id="virtualMemory"><div class="panel-body">
<pre class="language-"><code class="lang-cpp"><span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">include</span> <span class="token string">&lt;stdio.h&gt;</span></span>
<span class="token keyword">int</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token keyword">int</span> argn<span class="token punctuation">,</span><span class="token keyword">char</span><span class="token operator">*</span> args<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">{</span>

    <span class="token keyword">int</span> a <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span>
    <span class="token keyword">double</span> b <span class="token operator">=</span> <span class="token number">1.0</span><span class="token punctuation">;</span>

    <span class="token comment">// &#x8F93;&#x51FA;&#x5730;&#x5740;</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">&quot;int address: %p \n&quot;</span><span class="token punctuation">,</span><span class="token operator">&amp;</span>a<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">&quot;double address: %p \n&quot;</span><span class="token punctuation">,</span><span class="token operator">&amp;</span>b<span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token comment">// &#x5C06;&#x7A0B;&#x5E8F;&#x505C;&#x4F4F;&#xFF0C;&#x5728;&#x540E;&#x53F0;&#x4E00;&#x76F4;&#x8FD0;&#x884C;</span>
    <span class="token function">getchar</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre>
</div></div></div></sec>
<p><span style="font-size:24px;font-weight:bold" class="section2">3. swap space</span></p>
<p><strong><code>swap space</code>&#xFF1A;&#x5C31;&#x662F;&#x4E00;&#x5757;&#x78C1;&#x76D8;&#x7A7A;&#x95F4;&#xFF08;&#x786C;&#x76D8;&#x7A7A;&#x95F4;&#xFF09;&#x3002;&#x865A;&#x62DF;&#x5185;&#x5B58;&#x4E0E;&#x7269;&#x7406;&#x5185;&#x5B58;&#x6620;&#x5C04;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x5F53;&#x7269;&#x7406;&#x5185;&#x5B58;&#x4E0D;&#x591F;&#x7528;&#x65F6;&#xFF0C;&#x4F1A;&#x5C06;&#x4EE3;&#x7801;&#x653E;&#x5230;&#x300C;&#x4EA4;&#x6362;&#x533A;&#x300D;&#x4E2D;&#xFF0C;&#x4EE5;&#x540E;&#x5728;<code>CPU</code>&#x60F3;&#x8981;&#x6267;&#x884C;&#x76F8;&#x5173;&#x7684;&#x6307;&#x4EE4;&#x6216;&#x8005;&#x6570;&#x636E;&#x65F6;&#xFF0C;&#x5982;&#x679C;&#x5185;&#x5B58;&#x4E2D;&#x6CA1;&#x6709;&#xFF0C;&#x5148;&#x53BB;&#x4EA4;&#x6362;&#x533A;&#x5C06;&#x9700;&#x8981;&#x7684;&#x6307;&#x4EE4;&#x4E0E;&#x6570;&#x636E;&#x642C;&#x5230;&#x7269;&#x7406;&#x5185;&#x5B58;&#xFF0C;&#x7136;&#x540E;<code>CPU</code>&#x518D;&#x6267;&#x884C;&#x3002;</strong></p>
<p style="text-align:center;"><a href="../../image/linux/swapspace.png" data-lightbox="7547f908-39ec-40e9-bdf9-460d4b1887b0" data-title="undefined"><img src="../../image/linux/swapspace.png" alt="undefined"></a></p>

<p><strong>&#x5728;<code>CPU</code>&#x4E2D;&#x6267;&#x884C;&#x7684;&#x4EE3;&#x7801;&#x53EA;&#x662F;&#x5B8C;&#x6574;&#x7A0B;&#x5E8F;&#x7684;&#x4E00;&#x90E8;&#x5206;</strong>&#xFF0C;<code>CPU</code>&#x662F;&#x4F1A;&#x4EE5;&#x65F6;&#x95F4;&#x7247;&#x7684;&#x5F62;&#x5F0F;&#x8F6E;&#x6362;&#x6267;&#x884C;&#x591A;&#x4E2A;&#x7A0B;&#x5E8F;&#xFF1B;&#x5728;&#x8FD9;&#x91CC;<code>swap space</code>&#x5C31;&#x5145;&#x5F53;&#x4E86;&#x4E00;&#x4E2A;&#x300C;&#x4F11;&#x606F;&#x5BA4;&#x300D;&#xFF0C;&#x5F53;&#x300C;&#x7269;&#x7406;&#x5185;&#x5B58;&#x300D;&#x4E2D;&#x5BA2;&#x6D41;&#x91CF;&#x5927;&#x65F6;&#xFF08;&#x5185;&#x5B58;&#x88AB;&#x5360;&#x7528;&#x7684;&#x592A;&#x5389;&#x5BB3;&#xFF09;&#xFF0C;&#x5C31;&#x5C06;&#x300C;&#x7269;&#x7406;&#x5185;&#x5B58;&#x300D;&#x4E2D;&#x8FD8;&#x6709;&#x4E00;&#x6BB5;&#x65F6;&#x95F4;&#x624D;&#x80FD;&#x5207;&#x6362;&#x5230;&#x7684;&#x7A7A;&#x95F2;&#x7A0B;&#x5E8F;&#x7ED9;&#x64A4;&#x4E0B;&#x6765;&#xFF0C;&#x653E;&#x5230;&#x300C;&#x4EA4;&#x6362;&#x533A;&#x300D;&#x91CC;&#x7B49;&#x7740;&#xFF0C;&#x522B;&#x5360;&#x7528;&#x300C;&#x7269;&#x7406;&#x5185;&#x5B58;&#x300D;&#xFF0C;&#x7B49;&#x5230;&#x8981;&#x8FD0;&#x884C;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x53C8;&#x5C06;&#x7A0B;&#x5E8F;&#x4E0E;&#x6570;&#x636E;&#x52A0;&#x8F7D;&#x56DE;&#x300C;&#x7269;&#x7406;&#x5185;&#x5B58;&#x300D;&#x3002;<strong>&#x901A;&#x8FC7;<code>swap space</code>&#x8FD9;&#x5C31;&#x80FD;&#x5B9E;&#x73B0;&#x591A;&#x4E2A;&#x9700;&#x8981;&#x5927;&#x5185;&#x5B58;&#x8FD0;&#x884C;&#x7684;&#x7A0B;&#x5E8F;&#xFF0C;&#x80FD;&#x5728;&#x50A8;&#x5B58;&#x91CF;&#x5C0F;&#x7684;&#x7269;&#x7406;&#x5185;&#x5B58;&#x4E0A;&#x540C;&#x65F6;&#x8FD0;&#x3002;</strong></p>
<p><span style="font-size:24px;font-weight:bold" class="section2">4. cache/buffer</span></p>
<ul>
<li><strong>cache</strong>&#xFF1A;&#x7F13;&#x5B58;&#xFF0C;&#x7528;&#x6765;&#x52A0;&#x901F;&#x300C;&#x8BFB;&#x300D;&#x64CD;&#x4F5C;&#xFF1B;&#x5148;&#x628A;&#x4ECE;&#x78C1;&#x76D8;&#x8BFB;&#x53D6;&#x7684;&#x6570;&#x636E;&#x4FDD;&#x5B58;&#x5230;&#x5185;&#x5B58;&#x4E2D;&#xFF0C;&#x7136;&#x540E;<code>CPU</code>&#x4F7F;&#x7528;&#x65F6;&#xFF0C;&#x76F4;&#x63A5;&#x4ECE;&#x5185;&#x5B58;&#x4E2D;&#x8BFB;&#x53D6;&#xFF0C;&#x6548;&#x7387;&#x66F4;&#x5757;&#x3002;</li>
<li><strong>buffer</strong>&#xFF1A;&#x7F13;&#x51B2;&#x533A;&#xFF0C;&#x7528;&#x6765;&#x52A0;&#x901F;&#x300C;&#x5199;&#x300D;&#x64CD;&#x4F5C;&#xFF1B;&#x5148;&#x628A;&#x8981;&#x5199;&#x51FA;&#x7684;&#x6570;&#x636E;&#x4FDD;&#x5B58;&#x5230;&#x5185;&#x5B58;&#x4E2D;&#xFF0C;&#x8FBE;&#x5230;&#x4E00;&#x5B9A;&#x6570;&#x91CF;&#x540E;&#xFF0C;&#x7136;&#x540E;<code>CPU</code>&#x96C6;&#x4E2D;&#x5C06;&#x6570;&#x636E;&#x5199;&#x5165;&#x78C1;&#x76D8;&#x3002;</li>
</ul>
<h2 id="14-&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x7BA1;&#x7406;"><a name="14-&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x7BA1;&#x7406;" class="anchor-navigation-ex-anchor" href="#14-&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x7BA1;&#x7406;"><i class="fa fa-link" aria-hidden="true"></i></a>1.4. &#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x7BA1;&#x7406;</h2>
<p><strong><code>Linux</code>&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x5C06;&#x8FD0;&#x884C;&#x4E2D;&#x7684;&#x7A0B;&#x5E8F;&#x79F0;&#x4E3A;&#x300C;&#x8FDB;&#x7A0B;&#x300D;&#x3002;&#x6BCF;&#x4E2A;&#x8FDB;&#x7A0B;&#x5206;&#x914D;&#x4E00;&#x4E2A;&#x300C;virtual memory&#x300D;&#xFF0C;&#x771F;&#x6B63;&#x5728;&#x7269;&#x7406;&#x5185;&#x5B58;&#x4E0A;&#x8FD0;&#x884C;&#x7684;&#x5C31;&#x53EA;&#x662F;&#x5176;&#x4E2D;&#x4E00;&#x5C0F;&#x90E8;&#x5206;&#x3002;</strong> &#x8FDB;&#x7A0B;&#x53EF;&#x4EE5;&#x5728;&#x524D;&#x53F0;&#x8FD0;&#x884C;&#xFF0C;&#x5C06;&#x8F93;&#x51FA;&#x663E;&#x793A;&#x5728;&#x5C4F;&#x5E55;&#x4E0A;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x5728;&#x540E;&#x53F0;&#x8FD0;&#x884C;&#xFF0C;&#x9690;&#x85CF;&#x5230;&#x5E55;&#x540E;&#x3002;&#x5185;&#x6838;&#x63A7;&#x5236;&#x7740;<code>Linux</code>&#x7CFB;&#x7EDF;&#x5982;&#x4F55;&#x7BA1;&#x7406;&#x8FD0;&#x884C;&#x5728;&#x7CFB;&#x7EDF;&#x4E0A;&#x7684;&#x6240;&#x6709;&#x8FDB;&#x7A0B;&#x3002;</p>
<p><span style="font-size:24px;font-weight:bold" class="section2">1. <code>init</code>&#x8FDB;&#x7A0B;</span></p>
<p><strong><code>linux</code>&#x7CFB;&#x7EDF;&#x542F;&#x52A8;&#x540E;&#xFF0C;&#x7B2C;&#x4E00;&#x4E2A;&#x88AB;&#x521B;&#x5EFA;&#x7684;&#x300C;&#x7528;&#x6237;&#x6001;&#x300D;&#x8FDB;&#x7A0B;&#x5C31;&#x662F;<code>init</code>&#x8FDB;&#x7A0B;&#x3002;</strong></p>
<ol>
<li>&#x6267;&#x884C;&#x7CFB;&#x7EDF;&#x521D;&#x59CB;&#x5316;&#x811A;&#x672C;&#xFF0C;&#x521B;&#x5EFA;&#x4E00;&#x7CFB;&#x5217;&#x7684;&#x8FDB;&#x7A0B;&#xFF08;&#x5B83;&#x4EEC;&#x90FD;&#x662F;<code>init</code>&#x8FDB;&#x7A0B;&#x7684;&#x5B50;&#x5B59;&#xFF09;&#xFF1B;</li>
<li>&#x5728;&#x4E00;&#x4E2A;&#x6B7B;&#x5FAA;&#x73AF;&#x4E2D;&#x7B49;&#x5F85;&#x5176;&#x5B50;&#x8FDB;&#x7A0B;&#x7684;&#x9000;&#x51FA;&#x4E8B;&#x4EF6;&#xFF0C;&#x5E76;&#x8C03;&#x7528;<code>waitid</code>&#x7528;&#x6765;&#x5B8C;&#x6210;&#x300C;&#x6536;&#x5C38;&#x300D;&#x5DE5;&#x4F5C;&#xFF1B;</li>
<li><code>init</code>&#x8FDB;&#x7A0B;&#x4E0D;&#x4F1A;&#x88AB;&#x6682;&#x505C;</li>
<li><code>PID</code>&#x6C38;&#x8FDC;&#x4E3A;<code>1</code></li>
</ol>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">pstree</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`pstree`)"></i>
          <span class="terminullOutput">init&#x2500;&#x252C;&#x2500;init&#x2500;&#x2500;&#x2500;bash&#x2500;&#x2500;&#x2500;pstree
     &#x2514;&#x2500;{init}</span>
        
    </div>
</div><p></p>
<p><span style="font-size:24px;font-weight:bold" class="section2">2. 7&#x5927;&#x8FD0;&#x884C;&#x7EA7;&#x522B;</span></p>
<blockquote>
<p>[!tip]</p>
<ul>
<li><code>0</code>&#xFF1A;&#x7CFB;&#x7EDF;&#x505C;&#x673A;</li>
<li><code>1</code>&#xFF1A;&#x5355;&#x7528;&#x6237;&#x5DE5;&#x4F5C;&#x72B6;&#x6001;&#xFF0C;root&#x6743;&#x9650;&#xFF0C;&#x7528;&#x4E8E;&#x7CFB;&#x7EDF;&#x7EF4;&#x62A4;&#xFF0C;&#x7981;&#x6B62;&#x8FDC;&#x7A0B;&#x767B;&#x9646;</li>
<li><code>2</code>&#xFF1A;&#x591A;&#x7528;&#x6237;&#x72B6;&#x6001;(&#x6CA1;&#x6709;<code>NFS</code>&#xFF0C;&#x7F51;&#x7EDC;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;)</li>
<li><code>3</code>&#xFF1A;&#x5B8C;&#x5168;&#x7684;&#x591A;&#x7528;&#x6237;&#x72B6;&#x6001;(&#x6709;<code>NFS</code>&#xFF0C;&#x7F51;&#x7EDC;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;)&#xFF0C;&#x767B;&#x9646;&#x540E;&#x8FDB;&#x5165;&#x63A7;&#x5236;&#x53F0;&#x547D;&#x4EE4;&#x884C;&#x6A21;&#x5F0F;</li>
<li><code>4</code>&#xFF1A;&#x7CFB;&#x7EDF;&#x672A;&#x4F7F;&#x7528;&#xFF0C;&#x4FDD;&#x7559;</li>
<li><code>5</code>&#xFF1A;X11&#x63A7;&#x5236;&#x53F0;&#xFF0C;&#x684C;&#x9762;&#x6A21;&#x5F0F;</li>
<li><code>6</code>&#xFF1A;&#x7CFB;&#x7EDF;&#x6B63;&#x5E38;&#x5173;&#x95ED;&#x5E76;&#x91CD;&#x542F;</li>
</ul>
</blockquote>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">init &#x8FD0;&#x884C;&#x7EA7;&#x522B;&#x53F7;</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`init &#x8FD0;&#x884C;&#x7EA7;&#x522B;&#x53F7;`)"></i>
          <span class="terminullOutput"></span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">runlevel</span>
           
            <span class="terminullComment"># &#x5F53;&#x524D;&#x8FD0;&#x884C;&#x7EA7;&#x522B;</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`runlevel`)"></i>
          <span class="terminullOutput">5</span>
        
    </div>
</div><p></p>
<h2 id="15-&#x786C;&#x4EF6;&#x8BBE;&#x5907;&#x7BA1;&#x7406;"><a name="15-&#x786C;&#x4EF6;&#x8BBE;&#x5907;&#x7BA1;&#x7406;" class="anchor-navigation-ex-anchor" href="#15-&#x786C;&#x4EF6;&#x8BBE;&#x5907;&#x7BA1;&#x7406;"><i class="fa fa-link" aria-hidden="true"></i></a>1.5. &#x786C;&#x4EF6;&#x8BBE;&#x5907;&#x7BA1;&#x7406;</h2>
<p>&#x4EFB;&#x4F55;<code>Linux</code>&#x7CFB;&#x7EDF;&#x9700;&#x8981;&#x4E0E;&#x4E4B;&#x901A;&#x4FE1;&#x7684;&#x8BBE;&#x5907;&#xFF0C;&#x90FD;&#x9700;&#x8981;&#x5728;&#x5185;&#x6838;&#x4EE3;&#x7801;&#x4E2D;&#x52A0;&#x5165;&#x5BF9;&#x5E94;&#x7684;&#x300C;&#x9A71;&#x52A8;&#x7A0B;&#x5E8F;&#x4EE3;&#x7801;&#x300D;&#x3002;&#x9A71;&#x52A8;&#x7A0B;&#x5E8F;&#x4EE3;&#x7801;&#x76F8;&#x5F53;&#x4E8E;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x548C;&#x786C;&#x4EF6;&#x8BBE;&#x5907;&#x7684;&#x4E2D;&#x95F4;&#x4EBA;&#xFF0C;&#x5141;&#x8BB8;&#x5185;&#x6838;&#x4E0E;&#x8BBE;&#x5907;&#x4E4B;&#x95F4;&#x4EA4;&#x6362;&#x6570;&#x636E;&#x3002;</p>
<p>&#x5728;<code>Linux</code>&#x5185;&#x6838;&#x4E2D;&#x6709;&#x4E24;&#x79CD;&#x65B9;&#x6CD5;&#x7528;&#x4E8E;&#x63D2;&#x5165;&#x8BBE;&#x5907;&#x9A71;&#x52A8;&#x4EE3;&#x7801;:</p>
<ul>
<li><strong>&#x7F16;&#x8BD1;&#x8FDB;&#x5185;&#x6838;&#x7684;&#x8BBE;&#x5907;&#x9A71;&#x52A8;&#x4EE3;&#x7801;</strong>&#xFF1A;&#x52A0;&#x5165;&#x4EE3;&#x7801;&#xFF0C;&#x91CD;&#x65B0;&#x7F16;&#x8BD1;&#x5185;&#x6838;</li>
<li><strong>&#x53EF;&#x63D2;&#x5165;&#x5185;&#x6838;&#x7684;&#x8BBE;&#x5907;&#x9A71;&#x52A8;&#x6A21;&#x5757;</strong>&#xFF1A;&#x5141;&#x8BB8;&#x5C06;&#x9A71;&#x52A8;&#x4EE3;&#x7801;&#x63D2;&#x5165;&#x5230;&#x8FD0;&#x884C;&#x4E2D;&#x7684;&#x5185;&#x6838;&#x800C;&#x65E0;&#x9700;&#x91CD;&#x65B0;&#x7F16;&#x8BD1;&#x5185;&#x6838;&#x3002;&#x5F53;&#x8BBE;&#x5907;&#x4E0D;&#x518D;&#x4F7F;&#x7528;&#x65F6;&#x4E5F;&#x53EF;&#x5C06;&#x5185;&#x6838;&#x6A21;&#x5757;&#x4ECE;&#x5185;&#x6838;&#x4E2D;&#x79FB;&#x8D70;&#x3002;</li>
</ul>
<h2 id="16-&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7BA1;&#x7406;"><a name="16-&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7BA1;&#x7406;" class="anchor-navigation-ex-anchor" href="#16-&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7BA1;&#x7406;"><i class="fa fa-link" aria-hidden="true"></i></a>1.6. &#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7BA1;&#x7406;</h2>
<ul>
<li>&#x5185;&#x6838;&#x5FC5;&#x987B;&#x5728;&#x7F16;&#x8BD1;&#x65F6;&#x5C31;&#x52A0;&#x5165;&#x5BF9;&#x6240;&#x6709;&#x53EF;&#x80FD;&#x7528;&#x5230;&#x7684;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7684;&#x652F;&#x6301;</li>
<li><code>Linux</code>&#x5185;&#x6838;&#x91C7;&#x7528;&#x865A;&#x62DF;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;<code>(Virtual File System,VFS)</code>&#x4F5C;&#x4E3A;&#x548C;&#x6BCF;&#x4E2A;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x4EA4;&#x4E92;&#x7684;&#x63A5;&#x53E3;</li>
</ul>
<pre class="language-"><code class="lang-cpp">ext      <span class="token operator">|</span> Linux&#x6269;&#x5C55;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;<span class="token punctuation">,</span>&#x6700;&#x65E9;&#x7684;Linux&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
ext2     <span class="token operator">|</span> &#x7B2C;&#x4E8C;&#x6269;&#x5C55;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;<span class="token punctuation">,</span>&#x5728;ext&#x7684;&#x57FA;&#x7840;&#x4E0A;&#x63D0;&#x4F9B;&#x4E86;&#x66F4;&#x591A;&#x7684;&#x529F;&#x80FD;
ext3     <span class="token operator">|</span> &#x7B2C;&#x4E09;&#x6269;&#x5C55;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;<span class="token punctuation">,</span>&#x652F;&#x6301;&#x65E5;&#x5FD7;&#x529F;&#x80FD;
ext4     <span class="token operator">|</span> &#x7B2C;&#x56DB;&#x6269;&#x5C55;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;<span class="token punctuation">,</span>&#x652F;&#x6301;&#x9AD8;&#x7EA7;&#x65E5;&#x5FD7;&#x529F;&#x80FD;
hpfs     <span class="token operator">|</span> OS<span class="token operator">/</span><span class="token number">2</span>&#x9AD8;&#x6027;&#x80FD;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
jfs      <span class="token operator">|</span> IBM&#x65E5;&#x5FD7;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
iso9660  <span class="token operator">|</span> ISO <span class="token number">9660</span>&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;<span class="token punctuation">(</span>CD<span class="token operator">-</span>ROM<span class="token punctuation">)</span>
minix    <span class="token operator">|</span> MINIX&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
msdos    <span class="token operator">|</span> &#x5FAE;&#x8F6F;&#x7684;FAT16
ncp      <span class="token operator">|</span> Netware&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
nfs      <span class="token operator">|</span> &#x7F51;&#x7EDC;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
ntfs     <span class="token operator">|</span> &#x652F;&#x6301;Microsoft NT&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
proc     <span class="token operator">|</span> &#x8BBF;&#x95EE;&#x7CFB;&#x7EDF;&#x4FE1;&#x606F;
ReiserFS <span class="token operator">|</span> &#x9AD8;&#x7EA7;Linux&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;<span class="token punctuation">,</span>&#x80FD;&#x63D0;&#x4F9B;&#x66F4;&#x597D;&#x7684;&#x6027;&#x80FD;&#x548C;&#x786C;&#x76D8;&#x6062;&#x590D;&#x529F;&#x80FD;
smb      <span class="token operator">|</span> &#x652F;&#x6301;&#x7F51;&#x7EDC;&#x8BBF;&#x95EE;&#x7684;Samba SMB&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
sysv     <span class="token operator">|</span> &#x8F83;&#x65E9;&#x671F;&#x7684;Unix&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
ufs      <span class="token operator">|</span> BSD&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
umsdos   <span class="token operator">|</span> &#x5EFA;&#x7ACB;&#x5728;msdos&#x4E0A;&#x7684;&#x7C7B;Unix&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
vfat     <span class="token operator">|</span> Windows <span class="token number">95</span>&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;<span class="token punctuation">(</span>FAT32<span class="token punctuation">)</span>
XFS      <span class="token operator">|</span> &#x9AD8;&#x6027;&#x80FD;<span class="token number">64</span>&#x4F4D;&#x65E5;&#x5FD7;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;
</code></pre>
<h1 id="2-linux&#x7684;&#x542F;&#x52A8;&#x8FC7;&#x7A0B;"><a name="2-linux&#x7684;&#x542F;&#x52A8;&#x8FC7;&#x7A0B;" class="anchor-navigation-ex-anchor" href="#2-linux&#x7684;&#x542F;&#x52A8;&#x8FC7;&#x7A0B;"><i class="fa fa-link" aria-hidden="true"></i></a>2. <code>linux</code>&#x7684;&#x542F;&#x52A8;&#x8FC7;&#x7A0B;</h1>
<ol>
<li>&#x4E3B;&#x673A;&#x52A0;&#x7535;&#x81EA;&#x68C0;&#xFF0C;&#x52A0;&#x8F7D; <code>BIOS</code>&#x786C;&#x4EF6;&#x4FE1;&#x606F;&#x3002;</li>
<li>&#x8BFB;&#x53D6; <code>MBR</code> &#x7684;&#x5F15;&#x5BFC;&#x6587;&#x4EF6;(GRUB&#x3001;LILO)&#x3002;</li>
<li>&#x5F15;&#x5BFC; <code>Linux</code> &#x5185;&#x6838;&#x3002;</li>
<li>&#x8FD0;&#x884C;&#x7B2C;&#x4E00;&#x4E2A;&#x8FDB;&#x7A0B; <code>init</code> (&#x8FDB;&#x7A0B;&#x53F7;&#x6C38;&#x8FDC;&#x4E3A; 1 )&#x3002;</li>
<li>&#x8FDB;&#x5165;&#x76F8;&#x5E94;&#x7684;&#x300C;&#x8FD0;&#x884C;&#x7EA7;&#x522B;&#x300D;&#x3002;</li>
<li>&#x8FD0;&#x884C;&#x7EC8;&#x7AEF;&#xFF0C;&#x8F93;&#x5165;&#x7528;&#x6237;&#x540D;&#x548C;&#x5BC6;&#x7801;&#x3002;</li>
</ol>
<h1 id="3-&#x6587;&#x4EF6;"><a name="3-&#x6587;&#x4EF6;" class="anchor-navigation-ex-anchor" href="#3-&#x6587;&#x4EF6;"><i class="fa fa-link" aria-hidden="true"></i></a>3. &#x6587;&#x4EF6;</h1>
<p>&#x53C2;&#x8003;&#x535A;&#x5BA2;&#xFF1A;</p>
<ul>
<li><a href="https://blog.csdn.net/rong09_13/article/details/79233956" target="_blank">Linux&#x4E0B;&#x4E03;&#x79CD;&#x6587;&#x4EF6;&#x7C7B;&#x578B;&#x3001;&#x6587;&#x4EF6;&#x5C5E;&#x6027;&#x53CA;&#x5176;&#x67E5;&#x770B;&#x65B9;&#x6CD5;</a></li>
<li><a href="https://blog.csdn.net/feiyinzilgd/article/details/5609157" target="_blank">&#x6DF1;&#x5165;&#x7406;&#x89E3;linux i&#x8282;&#x70B9;(inode)</a></li>
<li><a href="https://zhidao.baidu.com/question/488568249980342132.html#:~:text=%E5%9C%A8Linux%E4%B8%8B%E4%B8%80%E5%88%87%E7%9A%86%E6%96%87%E4%BB%B6%EF%BC%8C%E5%9B%A0%E6%AD%A4%E7%9B%AE%E5%BD%95%E4%B9%9F%E6%98%AF%E6%96%87%E4%BB%B6%E3%80%82%20%E6%89%80%E4%BB%A5%EF%BC%8C%E9%80%9A%E8%BF%87%20ls%20-al%20%E5%91%BD%E4%BB%A4%E6%98%BE%E7%A4%BA%E7%9A%84%E7%9B%AE%E5%BD%95%E5%A4%A7%E5%B0%8F%E5%B9%B6%E9%9D%9E%E5%B8%B8%E8%A7%84%E6%84%8F%E4%B9%89%E4%B8%8A%E5%8C%85%E5%90%AB%E5%85%B6%E5%AD%90%E6%96%87%E4%BB%B6%E7%9A%84%E6%80%BB%E5%A4%A7%E5%B0%8F%EF%BC%8C%E8%80%8C%E6%98%AF%E5%8D%95%E7%BA%AF%E6%8C%87%E7%9A%84%E6%98%AF%E7%9B%AE%E5%BD%95%E7%9A%84%E5%A4%A7%E5%B0%8F%E3%80%82,%E8%BF%99%E4%B8%80%E7%82%B9%E5%92%8CWindows%E5%B9%B6%E4%B8%8D%E4%B8%80%E6%A0%B7%E3%80%82%20%E8%AF%B7%E6%B3%A8%E6%84%8F%E4%B8%80%E7%82%B9%EF%BC%8C%E5%85%B6%E5%AE%9ELinux%E4%B8%8B%E7%9B%AE%E5%BD%95%E7%9A%84%E5%A4%A7%E5%B0%8F%E5%B9%B6%E4%B8%8D%E9%83%BD%E6%98%AF4096%E7%9A%84%E3%80%82%20%E9%82%A3%E4%B9%88%E4%B8%BA%E4%BB%80%E4%B9%88%E5%A4%A7%E9%83%A8%E5%88%86%E7%9A%84%E7%9B%AE%E5%BD%95%E5%A4%A7%E5%B0%8F%E9%83%BD%E6%98%AF4096%E5%91%A2%EF%BC%9F%20%E8%BF%99%E9%9C%80%E8%A6%81%E4%BB%8ELinux%E6%96%87%E4%BB%B6%E7%9A%84%E5%AD%98%E5%82%A8%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E%E3%80%82%20%E6%96%87%E4%BB%B6%E5%82%A8%E5%AD%98%E5%9C%A8%E7%A1%AC%E7%9B%98%E4%B8%8A%EF%BC%8C%E7%A1%AC%E7%9B%98%E7%9A%84%E6%9C%80%E5%B0%8F%E5%AD%98%E5%82%A8%E5%8D%95%E4%BD%8D%E5%8F%AB%E5%81%9A%E2%80%9C%E6%89%87%E5%8C%BA%E2%80%9D%EF%BC%88Sector%EF%BC%89%E3%80%82%20%E6%AF%8F%E4%B8%AA%E6%89%87%E5%8C%BA%E5%82%A8%E5%AD%98512%E5%AD%97%E8%8A%82%EF%BC%88%E7%9B%B8%E5%BD%93%E4%BA%8E0.5KB%EF%BC%89%E3%80%82" target="_blank">&#x76EE;&#x5F55;&#x6587;&#x4EF6;</a></li>
</ul>
<h2 id="31-&#x6982;&#x5FF5;"><a name="31-&#x6982;&#x5FF5;" class="anchor-navigation-ex-anchor" href="#31-&#x6982;&#x5FF5;"><i class="fa fa-link" aria-hidden="true"></i></a>3.1. &#x6982;&#x5FF5;</h2>
<blockquote>
<p>[!warning|style:flat]
<strong>&#x5728;<code>Linux</code>&#x7CFB;&#x7EDF;&#x4E2D;&#xFF0C;&#x4E00;&#x5207;&#x7686;&#x662F;&#x6587;&#x4EF6;&#x3002;</strong></p>
</blockquote>
<h2 id="32-&#x6587;&#x4EF6;&#x5C5E;&#x6027;"><a name="32-&#x6587;&#x4EF6;&#x5C5E;&#x6027;" class="anchor-navigation-ex-anchor" href="#32-&#x6587;&#x4EF6;&#x5C5E;&#x6027;"><i class="fa fa-link" aria-hidden="true"></i></a>3.2. &#x6587;&#x4EF6;&#x5C5E;&#x6027;</h2>
<p style="text-align:center;"><a href="../../image/linux/file.png" data-lightbox="641cc79d-f9dc-41f3-afd4-bfd266838d67" data-title="undefined"><img src="../../image/linux/file.png" alt="undefined"></a></p>

<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">ls -ila</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`ls -ila`)"></i>
          <span class="terminullOutput">total 0
3377699720545409 drwxrwxrwx 1 triangle triangle 4096 Sep 10 19:54 .
1970324836981980 drwxrwxrwx 1 triangle triangle 4096 Sep  1 19:34 ..
 281474976816981 lrwxrwxrwx 1 triangle triangle   10 Sep 10 19:52 link1 -&gt; salary.txt
1407374883659532 -rwxrwxrwx 3 triangle triangle   55 Sep 10 12:59 linkd1
1407374883659532 -rwxrwxrwx 3 triangle triangle   55 Sep 10 12:59 linkd2
1407374883659532 -rwxrwxrwx 3 triangle triangle   55 Sep 10 12:59 salary.txt
 844424930238223 drwxrwxrwx 1 triangle triangle 4096 Sep  9 22:26 test</span>
        
    </div>
</div><p></p>
<h2 id="33-&#x4E03;&#x79CD;&#x6587;&#x4EF6;&#x7C7B;&#x578B;"><a name="33-&#x4E03;&#x79CD;&#x6587;&#x4EF6;&#x7C7B;&#x578B;" class="anchor-navigation-ex-anchor" href="#33-&#x4E03;&#x79CD;&#x6587;&#x4EF6;&#x7C7B;&#x578B;"><i class="fa fa-link" aria-hidden="true"></i></a>3.3. &#x4E03;&#x79CD;&#x6587;&#x4EF6;&#x7C7B;&#x578B;</h2>
<ul>
<li><strong>&#x666E;&#x901A;&#x6587;&#x4EF6;&#x7C7B;&#x578B;:<code>-</code></strong><ul>
<li><code>Linux</code>&#x4E2D;&#x6700;&#x591A;&#x7684;&#x4E00;&#x79CD;&#x6587;&#x4EF6;&#x7C7B;&#x578B;, &#x5305;&#x62EC; &#x7EAF;&#x6587;&#x672C;&#x6587;&#x4EF6;<code>(ASCII)</code>&#xFF1B;&#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;<code>(binary)</code>&#xFF1B;&#x6570;&#x636E;&#x683C;&#x5F0F;&#x7684;&#x6587;&#x4EF6;<code>(data)</code>;&#x5404;&#x79CD;&#x538B;&#x7F29;&#x6587;&#x4EF6;</li>
</ul>
</li>
<li><strong>&#x76EE;&#x5F55;&#x6587;&#x4EF6;:<code>d</code></strong><ul>
<li>&#x5C31;&#x662F;&#x6587;&#x4EF6;&#x5939;</li>
</ul>
</li>
<li><strong>&#x5757;&#x8BBE;&#x5907;&#x6587;&#x4EF6;:<code>b</code></strong><ul>
<li>&#x5C31;&#x662F;&#x5B58;&#x50A8;&#x6570;&#x636E;&#x4EE5;&#x4F9B;&#x7CFB;&#x7EDF;&#x5B58;&#x53D6;&#x7684;&#x63A5;&#x53E3;&#x8BBE;&#x5907;&#xFF0C;&#x7B80;&#x5355;&#x800C;&#x8A00;&#x5C31;&#x662F;&#x300C;&#x786C;&#x76D8;&#x300D;&#x3002;&#x4F8B;&#x5982;&#x4E00;&#x53F7;&#x786C;&#x76D8;&#x7684;&#x4EE3;&#x7801;&#x662F; <code>/dev/hda1</code> &#x7B49;&#x6587;&#x4EF6;&#x3002;</li>
</ul>
</li>
<li><strong>&#x5B57;&#x7B26;&#x8BBE;&#x5907;:<code>c</code></strong><ul>
<li>&#x4E32;&#x884C;&#x7AEF;&#x53E3;&#x7684;&#x63A5;&#x53E3;&#x8BBE;&#x5907;&#xFF0C;&#x4F8B;&#x5982;&#x952E;&#x76D8;&#x3001;&#x9F20;&#x6807;&#x7B49;&#x7B49;&#x3002;</li>
</ul>
</li>
<li><strong>&#x5957;&#x63A5;&#x5B57;&#x6587;&#x4EF6;:<code>s</code></strong><ul>
<li>&#x8FD9;&#x7C7B;&#x6587;&#x4EF6;&#x901A;&#x5E38;&#x7528;&#x5728;&#x7F51;&#x7EDC;&#x6570;&#x636E;&#x8FDE;&#x63A5;&#x3002;&#x53EF;&#x4EE5;&#x542F;&#x52A8;&#x4E00;&#x4E2A;&#x7A0B;&#x5E8F;&#x6765;&#x76D1;&#x542C;&#x5BA2;&#x6237;&#x7AEF;&#x7684;&#x8981;&#x6C42;&#xFF0C;&#x5BA2;&#x6237;&#x7AEF;&#x5C31;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x5957;&#x63A5;&#x5B57;&#x6765;&#x8FDB;&#x884C;&#x6570;&#x636E;&#x901A;&#x4FE1;&#x3002;&#x6700;&#x5E38;&#x5728;<code>/var/run</code>&#x76EE;&#x5F55;&#x4E2D;&#x770B;&#x5230;&#x8FD9;&#x79CD;&#x6587;&#x4EF6;&#x7C7B;&#x578B;</li>
</ul>
</li>
<li><strong>&#x7BA1;&#x9053;&#x6587;&#x4EF6;:<code>p</code></strong><ul>
<li><code>FIFO</code>&#x4E5F;&#x662F;&#x4E00;&#x79CD;&#x7279;&#x6B8A;&#x7684;&#x6587;&#x4EF6;&#x7C7B;&#x578B;&#xFF0C;&#x5B83;&#x4E3B;&#x8981;&#x7684;&#x76EE;&#x7684;&#x662F;&#x8FDB;&#x7A0B;&#x95F4;&#x901A;&#x8BAF;&#x3002;</li>
</ul>
</li>
<li><strong>&#x94FE;&#x63A5;&#x6587;&#x4EF6;:<code>l</code></strong><ul>
<li>&#x7C7B;&#x4F3C;<code>Windows</code>&#x4E0B;&#x9762;&#x7684;&#x5FEB;&#x6377;&#x65B9;&#x5F0F;&#x3002;</li>
</ul>
</li>
</ul>
<h2 id="34-&#x6587;&#x4EF6;&#x6743;&#x9650;"><a name="34-&#x6587;&#x4EF6;&#x6743;&#x9650;" class="anchor-navigation-ex-anchor" href="#34-&#x6587;&#x4EF6;&#x6743;&#x9650;"><i class="fa fa-link" aria-hidden="true"></i></a>3.4. &#x6587;&#x4EF6;&#x6743;&#x9650;</h2>
<ul>
<li>&#x6587;&#x4EF6;&#x7684;&#x8BBF;&#x95EE;&#x5BF9;&#x8C61;&#x5206;&#x4E3A;: <strong>u&#x7528;&#x6237;&#xFF0C;g&#x7EC4;&#xFF0C;o&#x5176;&#x4ED6;</strong> ;</li>
<li>&#x6587;&#x4EF6;&#x7684;&#x8BBF;&#x95EE;&#x6743;&#x9650;&#x5206;&#x4E3A;: <strong>r&#xFF0C;w&#xFF0C;x &#x5BF9;&#x5E94;&#x4E8C;&#x8FDB;&#x5236; 111</strong></li>
</ul>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">ls -laF</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`ls -laF`)"></i>
          <span class="terminullOutput">drwxrwxrwx 1 triangle triangle 4096 Sep 10 14:18 ./
drwxrwxrwx 1 triangle triangle 4096 Sep  1 19:34 ../
-rwxrwxrwx 1 triangle triangle   55 Sep 10 12:59 salary.txt*
drwxrwxrwx 1 triangle triangle 4096 Sep  9 22:26 test/
-rwxrwxrwx 1 triangle triangle   75 Sep 10 12:19 test.txt*</span>
        
    </div>
</div><p></p>
<h2 id="35-&#x6587;&#x4EF6;&#x65F6;&#x95F4;&#x6233;"><a name="35-&#x6587;&#x4EF6;&#x65F6;&#x95F4;&#x6233;" class="anchor-navigation-ex-anchor" href="#35-&#x6587;&#x4EF6;&#x65F6;&#x95F4;&#x6233;"><i class="fa fa-link" aria-hidden="true"></i></a>3.5. &#x6587;&#x4EF6;&#x65F6;&#x95F4;&#x6233;</h2>
<blockquote>
<p>[!note]</p>
<ul>
<li>&#x8BBF;&#x95EE;&#x65F6;&#x95F4; <code>(acces)</code> &#xFF08;<code>-atime</code> &#x5929;&#xFF0C;<code>-amin</code> &#x5206;&#x949F;&#xFF09;&#xFF1A;&#x6587;&#x4EF6;&#x88AB;&#x67E5;&#x770B;&#x7684;&#x65F6;&#x95F4;&#xFF0C;&#x7528;&#x6237;&#x6700;&#x8FD1;&#x4E00;&#x6B21;&#x8BBF;&#x95EE;&#x65F6;&#x95F4;&#x3002;</li>
<li>&#x4FEE;&#x6539;&#x65F6;&#x95F4; <code>(modify)</code>&#xFF08;<code>-mtime</code> &#x5929;&#xFF0C;<code>-mmin</code> &#x5206;&#x949F;&#xFF09;&#xFF1A;&#x300C;&#x5185;&#x5BB9;&#x6570;&#x636E;&#x300D;&#x88AB;&#x4FEE;&#x6539;&#x7684;&#x6700;&#x540E;&#x4E00;&#x6B21;&#x4FEE;&#x6539;&#x65F6;&#x95F4;&#x3002;</li>
<li>&#x53D8;&#x5316;&#x65F6;&#x95F4; <code>(change)</code>&#xFF08;<code>-ctime</code> &#x5929;&#xFF0C;<code>-cmin</code> &#x5206;&#x949F;&#xFF09;&#xFF1A;&#x72B6;&#x6001;&#x65F6;&#x95F4;&#xFF0C;&#x5F53;&#x6587;&#x4EF6;&#x7684;&#x72B6;&#x6001;&#x5373;&#x6587;&#x4EF6;&#x7684;&#x5C5E;&#x6027;&#x88AB;&#x6539;&#x53D8;&#x662F;&#x5C31;&#x4F1A;&#x66F4;&#x6539;&#x8FD9;&#x4E2A;&#x65F6;&#x95F4;&#xFF0C;&#x4F8B;&#x5982;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x4E2D;&#x7684;<code>links</code>(&#x94FE;&#x63A5;&#x6570;)&#xFF0C;<code>size</code>(&#x6587;&#x4EF6;&#x7684;&#x5927;&#x5C0F;)&#x3001;&#x6587;&#x4EF6;&#x7684;&#x6743;&#x9650;&#x3001;<code>blocks</code>(&#x6587;&#x4EF6;&#x7684;<code>block</code>&#x6570;)&#xFF1B;</li>
</ul>
</blockquote>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">stat command.md</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`stat command.md`)"></i>
          <span class="terminullOutput">File: command.md
Size: 1258            Blocks: 8          IO Block: 4096   regular file
Device: 11h/17d Inode: 562949953511263  Links: 1
Access: (0777/-rwxrwxrwx)  Uid: ( 1000/triangle)   Gid: ( 1000/triangle)
Access: 2021-09-08 10:21:03.394365400 +0800
Modify: 2021-09-08 10:11:44.128382200 +0800
Change: 2021-09-08 10:11:44.128382200 +0800
 Birth: -</span>
        
    </div>
</div><p></p>
<h2 id="36-&#x76EE;&#x5F55;&#x7684;&#x7ED3;&#x6784;"><a name="36-&#x76EE;&#x5F55;&#x7684;&#x7ED3;&#x6784;" class="anchor-navigation-ex-anchor" href="#36-&#x76EE;&#x5F55;&#x7684;&#x7ED3;&#x6784;"><i class="fa fa-link" aria-hidden="true"></i></a>3.6. &#x76EE;&#x5F55;&#x7684;&#x7ED3;&#x6784;</h2>
<p><strong>&#x786C;&#x76D8;&#x5185;&#x5B58;&#x7684;&#x5212;&#x5206;&#xFF1A;</strong></p>
<ol>
<li><strong>&#x5BFC;&#x5F15;&#x5757;</strong>: &#x52A0;&#x8F7D;&#x786C;&#x76D8;&#x6570;&#x636E;&#x7528;&#x7684;&#x7A0B;&#x5E8F;</li>
<li><strong>&#x4E13;&#x7528;&#x5757;</strong>: &#x78C1;&#x76D8;&#x76F8;&#x5173;&#x4FE1;&#x606F;&#xFF0C;&#x4F8B;&#x5982;&#xFF0C;&#x78C1;&#x76D8;&#x5927;&#x5C0F;&#x3002;</li>
<li><strong><code>i</code>&#x8282;&#x70B9;&#x8868;&#x5757;</strong>: &#x5B58;&#x50A8;&#x6240;&#x6709;&#x7684;<code>i</code>&#x8282;&#x70B9;</li>
<li><strong>&#x6570;&#x636E;&#x5B58;&#x50A8;&#x5757;</strong>: &#x6587;&#x4EF6;&#x6570;&#x636E;</li>
</ol>
<p><strong>&#x76EE;&#x5F55;</strong></p>
<ul>
<li><strong>&#x76EE;&#x5F55;: &#x5305;&#x542B;&#x300C;&#x4E00;&#x7EC4;&#x76EE;&#x5F55;&#x9879;&#x300D;&#x7684;&#x300C;&#x6587;&#x4EF6;&#x300D;</strong></li>
<li><strong>&#x76EE;&#x5F55;&#x9879;: &#x7531;&#x300C;&#x6587;&#x4EF6;&#x540D;&#x300D;&#x4E0E;&#x300C;i&#x8282;&#x70B9;&#x7D22;&#x5F15;&#x300D;</strong></li>
<li><strong>i&#x8282;&#x70B9;</strong>: &#x6307;&#x5411;&#x8BE5;&#x6587;&#x4EF6;&#x5728;&#x786C;&#x76D8;&#x4E0A;&#x7684;&#x300C;&#x6570;&#x636E;&#x5B58;&#x50A8;&#x5757;&#x300D;&#xFF0C;&#x8FD8;&#x5305;&#x542B;&#x4E86;&#x5F88;&#x591A;&#x4FE1;&#x606F;&#xFF0C;&#x6587;&#x4EF6;&#x7684;&#x521B;&#x5EFA;&#x8005;&#x3001;&#x6587;&#x4EF6;&#x7684;&#x521B;&#x5EFA;&#x65E5;&#x671F;&#x3001;&#x6587;&#x4EF6;&#x7684;&#x5927;&#x5C0F;&#x7B49;&#x7B49;&#xFF0C;<strong>&#x552F;&#x72EC;&#x4E0D;&#x8BB0;&#x5F55;&#x6587;&#x4EF6;&#x540D;</strong>&#x3002;</li>
<li><strong>&#x6587;&#x4EF6;&#xFF1A;&#x6BCF;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#x90FD;&#x5BF9;&#x5E94;&#x7740;&#x4E00;&#x4E2A;&#x300C;i&#x8282;&#x70B9;&#x300D;</strong></li>
</ul>
<p style="text-align:center;"><a href="../../image/linux/contentItem.png" data-lightbox="2db65eb6-dcae-40e4-a84f-1d1eada91ce5" data-title="undefined"><img src="../../image/linux/contentItem.png" alt="undefined"></a></p>

<blockquote>
<p>[!note|style:flat]
<span style="color:red;font-weight:bold"> &#x5BF9;&#x4E8E;<code>linux</code>&#x800C;&#x8A00;&#x9ED8;&#x8BA4;&#x7684;&#x4E00;&#x4E2A;<code>block</code>&#x4E3A;<code>4096</code>&#x4E2A;&#x5B57;&#x8282;&#xFF0C;&#x5BF9;&#x5E94;&#x786C;&#x76D8;<code>8</code>&#x4E2A;&#x6247;&#x533A;&#x3002;&#x7531;&#x4E8E;&#x300C;&#x6587;&#x4EF6;&#x5939;&#x300D;&#x5176;&#x5B9E;&#x5C31;&#x662F;&#x300C;&#x76EE;&#x5F55;&#x300D;&#xFF0C;&#x5373;&#x4E5F;&#x662F;&#x5B58;&#x50A8;&#x5728;&#x786C;&#x76D8;&#x4E0A;&#x7684;&#x4E00;&#x4E2A;&#x300C;&#x6587;&#x4EF6;&#x300D;&#xFF0C;&#x9ED8;&#x8BA4;&#x5206;&#x914D;&#x5927;&#x5C0F;&#x5C31;&#x662F;&#x4E00;&#x4E2A;<code>block</code>&#xFF0C;&#x6240;&#x4EE5;&#x4E00;&#x4E2A;&#x300C;&#x6587;&#x4EF6;&#x5939;&#x300D;&#x4F1A;&#x663E;&#x793A;&#x5927;&#x5C0F;&#x4E3A;<code>4096</code> </span></p>
</blockquote>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">ll | grep &apos;^d&apos;</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`ll | grep &apos;^d&apos;`)"></i>
          <span class="terminullOutput">drwxrwxrwx 1 triangle triangle 4096 Sep 10 18:43 ./
drwxrwxrwx 1 triangle triangle 4096 Sep  1 19:34 ../
drwxrwxrwx 1 triangle triangle 4096 Sep  9 22:26 test/
drwxrwxrwx 1 triangle triangle 4096 Sep 10 14:16 testTar/</span>
        
    </div>
</div><p></p>
<p><span style="font-size:24px;font-weight:bold" class="section2">&#x94FE;&#x63A5;</span></p>
<p style="text-align:center;"><a href="../../image/linux/ln.png" data-lightbox="ad016320-3d51-4134-b709-3cb52f4435ad" data-title="undefined"><img src="../../image/linux/ln.png" alt="undefined"></a></p>

<blockquote>
<p>[!tip]</p>
<ul>
<li><strong>&#x786C;&#x94FE;&#x63A5;</strong>: &#x591A;&#x4E2A;&#x300C;&#x76EE;&#x5F55;&#x9879;&#x300D;&#x7ED1;&#x5B9A;&#x5230;&#x4E86;&#x540C;&#x4E00;&#x7247;&#x300C;&#x6570;&#x636E;&#x50A8;&#x5B58;&#x5757;&#x300D;&#xFF08;&#x4E5F;&#x5C31;&#x662F;&#x540C;&#x4E00;&#x6587;&#x4EF6;&#xFF09;&#xFF1B;&#x300C;&#x786C;&#x94FE;&#x63A5;&#x300D;&#x4F1A;&#x4F7F;&#x5F97;&#x300C;&#x94FE;&#x63A5;&#x8BA1;&#x6570;&#x5668;&#x300D;&#x589E;&#x52A0;&#xFF0C;&#x8BA1;&#x6570;&#x5668;&#x8868;&#x793A;&#x4E86;&#x5F53;&#x524D;&#x6587;&#x4EF6;&#x88AB;&#x591A;&#x5C11;&#x4E2A;&#x6587;&#x4EF6;&#x7ED1;&#x5B9A;&#xFF0C;&#x5F53;&#x8BA1;&#x6570;&#x5668;&#x4E3A;<code>0</code>&#x65F6;&#xFF0C;&#x8BE5;&#x6587;&#x4EF6;&#x624D;&#x80FD;&#x771F;&#x6B63;&#x88AB;&#x5220;&#x9664;&#x3002;<ul>
<li><strong>&#x53EA;&#x6709;&#x8D85;&#x7EA7;&#x7528;&#x6237;&#x624D;&#x53EF;&#x4EE5;&#x4E3A;&#x76EE;&#x5F55;&#x521B;&#x5EFA;&#x786C;&#x94FE;&#x63A5;</strong></li>
<li><strong>&#x4E0D;&#x53EF;&#x4EE5;&#x5728;&#x4E0D;&#x540C;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7684;&#x6587;&#x4EF6;&#x95F4;&#x5EFA;&#x7ACB;&#x94FE;&#x63A5;</strong></li>
</ul>
</li>
<li><strong>&#x7B26;&#x53F7;&#x94FE;&#x63A5;</strong>: &#x662F;&#x4E00;&#x4E2A;&#x5305;&#x542B;&#x300C;i&#x7ED3;&#x70B9;&#x300D;&#x8DEF;&#x5F84;&#x7684;&#x4E00;&#x4E2A;&#x7D22;&#x5F15;&#x3002;<ul>
<li><strong>&#x8F6F;&#x94FE;&#x63A5;&#x514B;&#x670D;&#x4E86;&#x786C;&#x94FE;&#x63A5;&#x7684;&#x4E0D;&#x8DB3;</strong></li>
<li><strong>&#x5F53;&#x539F;&#x59CB;&#x6587;&#x4EF6;&#x4F4D;&#x7F6E;&#x53D8;&#x52A8;&#x6216;&#x8005;&#x88AB;&#x5220;&#x9664;&#xFF0C;&#x8F6F;&#x8FDE;&#x63A5;&#x5931;&#x6548;&#x3002;</strong></li>
</ul>
</li>
</ul>
</blockquote>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">ln -s salary.txt  link1</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`ln -s salary.txt  link1`)"></i>
          <span class="terminullOutput"></span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">ll | grep &apos;^l&apos;</span>
           
            <span class="terminullComment"># &#x540E;&#x9762;&#x8DDF;&#x7740;&#x7B26;&#x53F7;&#x94FE;&#x63A5;&#x6307;&#x5411;&#x6587;&#x4EF6;&#x7684;&#x8DEF;&#x5F84;</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`ll | grep &apos;^l&apos;`)"></i>
          <span class="terminullOutput">lrwxrwxrwx 1 triangle triangle   10 Sep 10 19:52 link1 -&gt; salary.txt*</span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">ln -d salary.txt linkd1</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`ln -d salary.txt linkd1`)"></i>
          <span class="terminullOutput"></span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">ln -d salary.txt linkd2</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`ln -d salary.txt linkd2`)"></i>
          <span class="terminullOutput"></span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">stat salary.txt</span>
           
            <span class="terminullComment"># links &#x94FE;&#x63A5;&#x6570;&#x4E3A; 3</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`stat salary.txt`)"></i>
          <span class="terminullOutput">File: salary.txt
  Size: 55              Blocks: 0          IO Block: 4096   regular file
Device: 11h/17d Inode: 1407374883659532  Links: 3
Access: (0777/-rwxrwxrwx)  Uid: ( 1000/triangle)   Gid: ( 1000/triangle)
Access: 2021-09-10 14:25:20.283459400 +0800
Modify: 2021-09-10 12:59:27.000000000 +0800
Change: 2021-09-10 19:54:34.610528800 +0800
 Birth: -</span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">ll | grep -E  &apos;linkd|salary&apos;</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`ll | grep -E  &apos;linkd|salary&apos;`)"></i>
          <span class="terminullOutput">lrwxrwxrwx 1 triangle triangle   10 Sep 10 19:52 link1 -&gt; salary.txt*
-rwxrwxrwx 3 triangle triangle   55 Sep 10 12:59 linkd1*
-rwxrwxrwx 3 triangle triangle   55 Sep 10 12:59 linkd2*
-rwxrwxrwx 3 triangle triangle   55 Sep 10 12:59 salary.txt*</span>
        
    </div>
</div><p></p>
<h1 id="4-&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x4E0E;&#x8FDB;&#x7A0B;"><a name="4-&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x4E0E;&#x8FDB;&#x7A0B;" class="anchor-navigation-ex-anchor" href="#4-&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x4E0E;&#x8FDB;&#x7A0B;"><i class="fa fa-link" aria-hidden="true"></i></a>4. &#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x4E0E;&#x8FDB;&#x7A0B;</h1>
<h2 id="41-&#x8FDB;&#x7A0B;"><a name="41-&#x8FDB;&#x7A0B;" class="anchor-navigation-ex-anchor" href="#41-&#x8FDB;&#x7A0B;"><i class="fa fa-link" aria-hidden="true"></i></a>4.1. &#x8FDB;&#x7A0B;</h2>
<p><span style="font-size:24px;font-weight:bold" class="section2">1. <code>task_struct</code></span></p>
<p><strong>&#x5BF9;&#x4E8E;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#xFF0C;&#x8FDB;&#x7A0B;&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x6570;&#x636E;&#x7ED3;&#x6784;:</strong></p>
<pre class="language-"><code class="lang-cpp"><span class="token keyword">struct</span> <span class="token class-name">task_struct</span> <span class="token punctuation">{</span>
    <span class="token comment">// &#x8FDB;&#x7A0B;&#x72B6;&#x6001;</span>
    <span class="token keyword">long</span>              state<span class="token punctuation">;</span>
    <span class="token comment">// &#x865A;&#x62DF;&#x5185;&#x5B58;&#x7ED3;&#x6784;&#x4F53;</span>
    <span class="token keyword">struct</span> <span class="token class-name">mm_struct</span>  <span class="token operator">*</span>mm<span class="token punctuation">;</span>
    <span class="token comment">// &#x8FDB;&#x7A0B;&#x53F7;</span>
    pid_t              pid<span class="token punctuation">;</span>
    <span class="token comment">// &#x6307;&#x5411;&#x7236;&#x8FDB;&#x7A0B;&#x7684;&#x6307;&#x9488;</span>
    <span class="token keyword">struct</span> <span class="token class-name">task_struct</span> __rcu  <span class="token operator">*</span>parent<span class="token punctuation">;</span>
    <span class="token comment">// &#x5B50;&#x8FDB;&#x7A0B;&#x5217;&#x8868;</span>
    <span class="token keyword">struct</span> <span class="token class-name">list_head</span>        children<span class="token punctuation">;</span>
    <span class="token comment">// &#x5B58;&#x653E;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x4FE1;&#x606F;&#x7684;&#x6307;&#x9488;</span>
    <span class="token keyword">struct</span> <span class="token class-name">fs_struct</span>        <span class="token operator">*</span>fs<span class="token punctuation">;</span>
    <span class="token comment">// &#x4E00;&#x4E2A;&#x6570;&#x7EC4;&#xFF0C;&#x5305;&#x542B;&#x8BE5;&#x8FDB;&#x7A0B;&#x6253;&#x5F00;&#x7684;&#x6587;&#x4EF6;&#x6307;&#x9488;</span>
    <span class="token keyword">struct</span> <span class="token class-name">files_struct</span>        <span class="token operator">*</span>files<span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre>
<p><strong>- <code>mm</code>: &#x6307;&#x5411;&#x7684;&#x662F;&#x8FDB;&#x7A0B;&#x7684;&#x865A;&#x62DF;&#x5185;&#x5B58;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x8F7D;&#x5165;&#x8D44;&#x6E90;&#x548C;&#x53EF;&#x6267;&#x884C;&#x6587;&#x4EF6;&#x7684;&#x5730;&#x65B9;</strong>
<strong>- <code>files</code>&#xFF1A;&#x8FD9;&#x4E2A;&#x6570;&#x7EC4;&#x91CC;&#x88C5;&#x7740;&#x6240;&#x6709;&#x8BE5;&#x8FDB;&#x7A0B;&#x6253;&#x5F00;&#x7684;&#x6587;&#x4EF6;&#x7684;&#x6307;&#x9488;</strong></p>
<p><span style="font-size:24px;font-weight:bold" class="section2">2. &#x8FDB;&#x7A0B;&#x4E0E;&#x7EBF;&#x7A0B;</span></p>
<p style="text-align:center;"><a href="../../image/linux/process.jpg" data-lightbox="b5f8c78b-bf5d-4bd9-9b89-195c4a528435" data-title="undefined"><img src="../../image/linux/process.jpg" alt="undefined"></a></p>

<p style="text-align:center;"><a href="../../image/linux/thread.jpg" data-lightbox="08d9a93c-c343-4e02-94cc-3d4e65f26404" data-title="undefined"><img src="../../image/linux/thread.jpg" alt="undefined"></a></p>

<blockquote>
<p>[!note|style:flat]
<strong>&#x5BF9;&#x4E8E;<code>linux</code>&#x4F46;&#x65E0;&#x8BBA;&#x7EBF;&#x7A0B;&#x8FD8;&#x662F;&#x8FDB;&#x7A0B;&#xFF0C;&#x90FD;&#x662F;&#x7528; <code>task_struct</code> &#x7ED3;&#x6784;&#x8868;&#x793A;&#x7684;&#xFF0C;&#x552F;&#x4E00;&#x7684;&#x533A;&#x522B;&#x5C31;&#x662F;&#x5171;&#x4EAB;&#x7684;&#x6570;&#x636E;&#x533A;&#x57DF;&#x4E0D;&#x540C;&#x3002;</strong></p>
</blockquote>
<h2 id="42-&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;"><a name="42-&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;" class="anchor-navigation-ex-anchor" href="#42-&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;"><i class="fa fa-link" aria-hidden="true"></i></a>4.2. &#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;</h2>
<p style="text-align:center;"><a href="../../image/linux/files.jpg" data-lightbox="3146f8c4-394a-471c-9043-37b7e66c2e4f" data-title="undefined"><img src="../../image/linux/files.jpg" alt="undefined"></a></p>

<p><strong>&#x5B9A;&#x4E49;&#xFF1A;&#x6BCF;&#x4E2A;&#x8FDB;&#x7A0B;&#x88AB;&#x521B;&#x5EFA;&#x65F6;&#xFF0C;files &#x7684;&#x524D;&#x4E09;&#x4F4D;&#x88AB;&#x586B;&#x5165;&#x9ED8;&#x8BA4;&#x503C;&#xFF0C;&#x5206;&#x522B;&#x6307;&#x5411;&#x300C;&#x6807;&#x51C6;&#x8F93;&#x5165;&#x6D41;&#x300D;&#x3001;&#x300C;&#x6807;&#x51C6;&#x8F93;&#x51FA;&#x6D41;&#x300D;&#x3001;&#x300C;&#x6807;&#x51C6;&#x9519;&#x8BEF;&#x6D41;&#x300D;&#x3002;&#x6211;&#x4EEC;&#x5E38;&#x8BF4;&#x7684;&#x300C;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x300D;&#x5C31;&#x662F;&#x6307;&#x8FD9;&#x4E2A;&#x6587;&#x4EF6;&#x6307;&#x9488;&#x6570;&#x7EC4;&#x7684;&#x7D22;&#x5F15;&#x3002;</strong></p>
<blockquote>
<p>[!tip]</p>
<ul>
<li><code>0</code>: &#x5C31;&#x662F;<code>stdin</code></li>
<li><code>1</code>: &#x5C31;&#x662F;<code>stdout</code></li>
<li><code>2</code>: &#x5C31;&#x662F;<code>stderr</code></li>
</ul>
</blockquote>
<p><strong>&#x7531;&#x4E8E;&#x5728;<code>linux</code>&#x4E2D;&#xFF0C;&#x5B9A;&#x4E49;&#x4E00;&#x5207;&#x5185;&#x5BB9;&#x7686;&#x662F;&#x6587;&#x4EF6;&#xFF0C;&#x90A3;&#x4E48;&#x8981;&#x64CD;&#x4F5C;&#x4EC0;&#x4E48;&#x5916;&#x90E8;&#x5185;&#x5BB9;&#x5C31;&#x53EF;&#x4EE5;&#x5F80;&#x8FD9;&#x4E2A;<code>files</code>&#x7ED3;&#x6784;&#x4F53;&#x4E2D;&#x63D2;&#x5165;&#x300C;&#x6587;&#x4EF6;&#x300D;&#x8FDB;&#x884C;&#x64CD;&#x4F5C;&#x3002;</strong></p>
<p style="text-align:center;"><a href="../../image/linux/otherfiles.jpg" data-lightbox="4546a191-cea9-42e3-bce9-f1b1f7188b82" data-title="undefined"><img src="../../image/linux/otherfiles.jpg" alt="undefined"></a></p>

<h2 id="43-&#x91CD;&#x5B9A;&#x5411;"><a name="43-&#x91CD;&#x5B9A;&#x5411;" class="anchor-navigation-ex-anchor" href="#43-&#x91CD;&#x5B9A;&#x5411;"><i class="fa fa-link" aria-hidden="true"></i></a>4.3. &#x91CD;&#x5B9A;&#x5411;</h2>
<p><span style="font-size:24px;font-weight:bold" class="section2">1. &#x8F93;&#x5165;&#x91CD;&#x5B9A;&#x5411;</span></p>
<p><strong>&#x539F;&#x7406;&#xFF1A;&#x5C31;&#x662F;&#x628A;<code>files[0]</code>&#x4FEE;&#x6539;&#x6389;&#x3002;</strong></p>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">command &lt; test.txt</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`command &lt; test.txt`)"></i>
          <span class="terminullOutput"></span>
        
    </div>
</div><p></p>
<p style="text-align:center;"><a href="../../image/linux/reopenStdin.jpg" data-lightbox="81dfb04a-23b2-49c2-85b3-9ed3fb9689c5" data-title="undefined"><img src="../../image/linux/reopenStdin.jpg" alt="undefined"></a></p>

<p><span style="font-size:24px;font-weight:bold" class="section2">2. &#x8F93;&#x51FA;&#x91CD;&#x5B9A;&#x5411;</span></p>
<p><strong>&#x539F;&#x7406;&#xFF1A;&#x5C31;&#x662F;&#x628A;<code>files[1]</code>&#x4FEE;&#x6539;&#x6389;&#x3002;</strong></p>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">command &gt; test.txt</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`command &gt; test.txt`)"></i>
          <span class="terminullOutput"></span>
        
    </div>
</div><p></p>
<p style="text-align:center;"><a href="../../image/linux/reopenstdout.jpg" data-lightbox="2b352b67-1849-42a4-a6e3-a3c3685c7f6d" data-title="undefined"><img src="../../image/linux/reopenstdout.jpg" alt="undefined"></a></p>

<h2 id="44-&#x4ED6;&#x4F4D;&#x7F6E;&#x7684;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;"><a name="44-&#x4ED6;&#x4F4D;&#x7F6E;&#x7684;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;" class="anchor-navigation-ex-anchor" href="#44-&#x4ED6;&#x4F4D;&#x7F6E;&#x7684;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;"><i class="fa fa-link" aria-hidden="true"></i></a>4.4. &#x4ED6;&#x4F4D;&#x7F6E;&#x7684;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;</h2>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">exec 8&lt;&gt; /dev/tcp/www.baidu.com/80</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`exec 8&lt;&gt; /dev/tcp/www.baidu.com/80`)"></i>
          <span class="terminullOutput"></span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">echo -e &apos;GET / HTTP/1.0\n&apos; 1&gt;&amp; 8</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`echo -e &apos;GET / HTTP/1.0\n&apos; 1&gt;&amp; 8`)"></i>
          <span class="terminullOutput"></span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">cat 0&lt;&amp; 8</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`cat 0&lt;&amp; 8`)"></i>
          <span class="terminullOutput">HTTP/1.0 200 OK
Accept-Ranges: bytes
Cache-Control: no-cache
Content-Length: 14615
Content-Type: text/html
....</span>
        
    </div>
</div><p></p>
<blockquote>
<p>[!tip]
<code>A &gt;&amp; B</code>&#xFF1A;</p>
<ul>
<li><code>A,B</code>&#xFF1A;<code>files[]</code>&#x7684;&#x7D22;&#x5F15;&#x6570;&#x5B57;</li>
<li><code>&amp;</code>&#xFF1A;&#x5C06;<code>B</code>&#x4E0E;<code>A</code>&#x7ED1;&#x5B9A;</li>
<li><code>&gt; &lt;</code>&#xFF1A;&#x662F;&#x8F93;&#x5165;&#x66FF;&#x6362;&#xFF0C;&#x8FD8;&#x662F;&#x8F93;&#x51FA;&#x66FF;&#x6362;&#x3002;</li>
</ul>
</blockquote>
<h1 id="5-&#x73AF;&#x5883;&#x53D8;&#x91CF;"><a name="5-&#x73AF;&#x5883;&#x53D8;&#x91CF;" class="anchor-navigation-ex-anchor" href="#5-&#x73AF;&#x5883;&#x53D8;&#x91CF;"><i class="fa fa-link" aria-hidden="true"></i></a>5. &#x73AF;&#x5883;&#x53D8;&#x91CF;</h1>
<p>&#x53C2;&#x8003;&#x535A;&#x5BA2;&#xFF1A;</p>
<ul>
<li><a href="https://zhuanlan.zhihu.com/p/317282094" target="_blank">&#x8D85;&#x8BE6;&#x5E72;&#x8D27;&#xFF01;Linux &#x73AF;&#x5883;&#x53D8;&#x91CF;&#x914D;&#x7F6E;&#x5168;&#x653B;&#x7565;</a></li>
</ul>
<h2 id="51-&#x5B9A;&#x4E49;"><a name="51-&#x5B9A;&#x4E49;" class="anchor-navigation-ex-anchor" href="#51-&#x5B9A;&#x4E49;"><i class="fa fa-link" aria-hidden="true"></i></a>5.1. &#x5B9A;&#x4E49;</h2>
<blockquote>
<p>[!tip]
<strong>&#x5728; <code>Linux</code> &#x7CFB;&#x7EDF;&#x4E2D;&#xFF0C;&#x300C;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x300D;&#x662F;&#x7528;&#x6765;&#x5B9A;&#x4E49;&#x7CFB;&#x7EDF;&#x8FD0;&#x884C;&#x73AF;&#x5883;&#x7684;&#x4E00;&#x4E9B;&#x53C2;&#x6570;&#xFF0C;&#x6BD4;&#x5982;&#x6BCF;&#x4E2A;&#x7528;&#x6237;&#x4E0D;&#x540C;&#x7684;&#x5BB6;&#x76EE;&#x5F55;<code>&#xFF08;HOME&#xFF09;</code>&#x3001;&#x90AE;&#x4EF6;&#x5B58;&#x653E;&#x4F4D;&#x7F6E;<code>&#xFF08;MAIL&#xFF09;</code>&#x7B49;&#x3002;</strong></p>
</blockquote>
<table>
<thead>
<tr>
<th>&#x53D8;&#x91CF;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td>HOME</td>
<td>&#x7528;&#x6237;&#x7684;&#x4E3B;&#x76EE;&#x5F55;&#xFF08;&#x4E5F;&#x79F0;&#x5BB6;&#x76EE;&#x5F55;&#xFF09;</td>
</tr>
<tr>
<td>SHELL</td>
<td>&#x7528;&#x6237;&#x4F7F;&#x7528;&#x7684; Shell &#x89E3;&#x91CA;&#x5668;&#x540D;&#x79F0;</td>
</tr>
<tr>
<td>PATH</td>
<td>&#x5B9A;&#x4E49;&#x547D;&#x4EE4;&#x884C;&#x89E3;&#x91CA;&#x5668;&#x641C;&#x7D22;&#x7528;&#x6237;&#x6267;&#x884C;&#x547D;&#x4EE4;&#x7684;&#x8DEF;&#x5F84;</td>
</tr>
<tr>
<td>EDITOR</td>
<td>&#x7528;&#x6237;&#x9ED8;&#x8BA4;&#x7684;&#x6587;&#x672C;&#x89E3;&#x91CA;&#x5668;</td>
</tr>
<tr>
<td>RANDOM</td>
<td>&#x751F;&#x6210;&#x4E00;&#x4E2A;&#x968F;&#x673A;&#x6570;&#x5B57;</td>
</tr>
<tr>
<td>LANG</td>
<td>&#x7CFB;&#x7EDF;&#x8BED;&#x8A00;&#x3001;&#x8BED;&#x7CFB;&#x540D;&#x79F0;</td>
</tr>
<tr>
<td>HISTSIZE</td>
<td>&#x8F93;&#x51FA;&#x7684;&#x5386;&#x53F2;&#x547D;&#x4EE4;&#x8BB0;&#x5F55;&#x6761;&#x6570;</td>
</tr>
<tr>
<td>HISTFILESIZE</td>
<td>&#x4FDD;&#x5B58;&#x7684;&#x5386;&#x53F2;&#x547D;&#x4EE4;&#x8BB0;&#x5F55;&#x6761;&#x6570;</td>
</tr>
<tr>
<td>PS1</td>
<td>Bash&#x89E3;&#x91CA;&#x5668;&#x7684;&#x63D0;&#x793A;&#x7B26;</td>
</tr>
<tr>
<td>MAIL</td>
<td>&#x90AE;&#x4EF6;&#x4FDD;&#x5B58;&#x8DEF;&#x5F84;</td>
</tr>
</tbody>
</table>
<h2 id="52-&#x67E5;&#x770B;"><a name="52-&#x67E5;&#x770B;" class="anchor-navigation-ex-anchor" href="#52-&#x67E5;&#x770B;"><i class="fa fa-link" aria-hidden="true"></i></a>5.2. &#x67E5;&#x770B;</h2>
<blockquote>
<p>[!warning|style:flat]
<span style="color:red;font-weight:bold"> <code>&#xA5;</code> &#x662F; <code>dollor</code>&#x82F1;&#x6587;&#x7B26;&#x53F7; </span></p>
</blockquote>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">env</span>
           
            <span class="terminullComment"># &#x67E5;&#x770B;&#x5168;&#x90E8;</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`env`)"></i>
          <span class="terminullOutput">...
HOSTTYPE=x86_64
LESSCLOSE=/usr/bin/lesspipe %s %s
WT_SESSION=d4b9b3a0-7112-4e08-a3ac-5062b7740ec5
LANG=C.UTF-8
WSL_DISTRO_NAME=Ubuntu-18.04
USER=triangle
PWD=/mnt/f/workPlace/linux
HOME=/home/triangle
NAME=DESKTOP-RDTVBUO
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
SHELL=/bin/bash
TERM=xterm-256color
SHLVL=1
LOGNAME=triangle
...</span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">export</span>
           
            <span class="terminullComment"># &#x67E5;&#x770B;&#x5168;&#x90E8;</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`export`)"></i>
          <span class="terminullOutput">....
declare -x PWD=&quot;/mnt/f/workPlace/linux&quot;
declare -x SHELL=&quot;/bin/bash&quot;
declare -x SHLVL=&quot;1&quot;
declare -x TERM=&quot;xterm-256color&quot;
declare -x USER=&quot;triangle&quot;
declare -x WSLENV=&quot;WT_SESSION::WT_PROFILE_ID&quot;
declare -x WSL_DISTRO_NAME=&quot;Ubuntu-18.04&quot;
declare -x WT_PROFILE_ID=&quot;{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}&quot;
declare -x WT_SESSION=&quot;d4b9b3a0-7112-4e08-a3ac-5062b7740ec5&quot;
....</span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">echo &#xA5;USER</span>
           
            <span class="terminullComment"># &#x67E5;&#x770B;&#x6307;&#x5B9A;</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`echo &#xA5;USER`)"></i>
          <span class="terminullOutput">triangle</span>
        
    </div>
</div><p></p>
<h2 id="53-&#x521B;&#x5EFA;"><a name="53-&#x521B;&#x5EFA;" class="anchor-navigation-ex-anchor" href="#53-&#x521B;&#x5EFA;"><i class="fa fa-link" aria-hidden="true"></i></a>5.3. &#x521B;&#x5EFA;</h2>
<p><span style="font-size:24px;font-weight:bold" class="section2">&#x7EC8;&#x7AEF;&#x76F4;&#x63A5;&#x5B9A;&#x4E49;&#x53D8;&#x91CF;</span></p>
<blockquote>
<p>[!warning|style:flat]
<span style="color:red;font-weight:bold"> <code>&#xA5;</code> &#x662F; <code>dollor</code>&#x82F1;&#x8BED;&#x7B26;&#x53F7; </span></p>
</blockquote>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">FUCK=&apos;hellow world&apos;</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`FUCK=&apos;hellow world&apos;`)"></i>
          <span class="terminullOutput"></span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">echo &#xA5;FUCK</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`echo &#xA5;FUCK`)"></i>
          <span class="terminullOutput">hellow world</span>
        
    </div>
</div><p></p>
<blockquote>
<p>[!tip]</p>
<ul>
<li><strong>&#x751F;&#x6548;&#x65F6;&#x95F4;</strong>: &#x7ACB;&#x5373;&#x751F;&#x6548;</li>
<li><strong>&#x751F;&#x6548;&#x671F;&#x9650;</strong>: &#x5F53;&#x524D;&#x7EC8;&#x7AEF;&#x7528;&#x6237;&#xFF0C;<strong>&#x5207;&#x6362;&#x7528;&#x6237;&#x540E;&#x5931;&#x6548;</strong></li>
<li><strong>&#x751F;&#x6548;&#x8303;&#x56F4;</strong>&#xFF1A;&#x4EC5;&#x5BF9;&#x5F53;&#x524D;&#x7528;&#x6237;&#x6709;&#x6548;</li>
</ul>
</blockquote>
<p><span style="font-size:24px;font-weight:bold" class="section2">&#x7EC8;&#x7AEF;<code>export</code>&#x5B9A;&#x4E49;&#x53D8;&#x91CF;</span></p>
<blockquote>
<p>[!warning|style:flat]
<span style="color:red;font-weight:bold"> <code>&#xA5;</code> &#x662F; <code>dollor</code>&#x82F1;&#x6587;&#x7B26;&#x53F7; </span></p>
</blockquote>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">export FUCK=&apos;hellow world&apos;</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`export FUCK=&apos;hellow world&apos;`)"></i>
          <span class="terminullOutput"></span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">echo &#xA5;FUCK</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`echo &#xA5;FUCK`)"></i>
          <span class="terminullOutput">hellow world</span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">su</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`su`)"></i>
          <span class="terminullOutput"></span>
        
          <span class="terminullDirectory">root@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">echo &#xA5;FUCK</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`echo &#xA5;FUCK`)"></i>
          <span class="terminullOutput">hellow world</span>
        
    </div>
</div><p></p>
<blockquote>
<p>[!tip]</p>
<ul>
<li><strong>&#x751F;&#x6548;&#x65F6;&#x95F4;</strong>: &#x7ACB;&#x5373;&#x751F;&#x6548;</li>
<li><strong>&#x751F;&#x6548;&#x671F;&#x9650;</strong>: &#x5F53;&#x524D;&#x7EC8;&#x7AEF;&#xFF0C;<strong>&#x91CD;&#x542F;&#x7EC8;&#x7AEF;&#x5931;&#x6548;</strong></li>
<li><strong>&#x751F;&#x6548;&#x8303;&#x56F4;</strong>&#xFF1A;<strong>&#x6240;&#x6709;&#x7528;&#x6237;</strong></li>
</ul>
</blockquote>
<p><span style="font-size:24px;font-weight:bold" class="section2"> &#x5728;<code>~/.bashrc</code> &#x6DFB;&#x52A0; </span></p>
<blockquote>
<p>[!tip]</p>
<ul>
<li><strong>&#x751F;&#x6548;&#x65F6;&#x95F4;</strong>: &#x91CD;&#x542F;&#x7EC8;&#x7AEF;&#xFF0C;&#x6216;&#x8005;<code>source ~/.bashrc</code></li>
<li><strong>&#x751F;&#x6548;&#x671F;&#x9650;</strong>: &#x6C38;&#x4E45;&#x6709;&#x6548;</li>
<li><strong>&#x751F;&#x6548;&#x8303;&#x56F4;&#xFF1A;&#x4EC5;&#x5BF9;&#x5F53;&#x524D;&#x7528;&#x6237;&#x6709;&#x6548;</strong></li>
</ul>
</blockquote>
<p><span style="font-size:24px;font-weight:bold" class="section2"> &#x5728;<code>/etc/environment</code> &#x6DFB;&#x52A0; </span></p>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">cat /etc/environment</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`cat /etc/environment`)"></i>
          <span class="terminullOutput">PATH=&quot;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games&quot;</span>
        
    </div>
</div><p></p>
<blockquote>
<p>[!tip]</p>
<ul>
<li><strong>&#x751F;&#x6548;&#x65F6;&#x95F4;</strong>: &#x91CD;&#x542F;&#x7EC8;&#x7AEF;&#xFF0C;&#x6216;&#x8005;<code>source ~/.bashrc</code></li>
<li><strong>&#x751F;&#x6548;&#x671F;&#x9650;</strong>: &#x6C38;&#x4E45;&#x6709;&#x6548;</li>
<li><strong>&#x751F;&#x6548;&#x8303;&#x56F4;&#xFF1A;&#x5BF9;&#x6240;&#x6709;&#x7528;&#x6237;&#x6709;&#x6548;</strong></li>
</ul>
</blockquote>
<h1 id="6-crontab&#x5B9A;&#x65F6;"><a name="6-crontab&#x5B9A;&#x65F6;" class="anchor-navigation-ex-anchor" href="#6-crontab&#x5B9A;&#x65F6;"><i class="fa fa-link" aria-hidden="true"></i></a>6. <code>crontab</code>&#x5B9A;&#x65F6;</h1>
<h2 id="61-&#x7B80;&#x4ECB;"><a name="61-&#x7B80;&#x4ECB;" class="anchor-navigation-ex-anchor" href="#61-&#x7B80;&#x4ECB;"><i class="fa fa-link" aria-hidden="true"></i></a>6.1. &#x7B80;&#x4ECB;</h2>
<p><strong>&#x4F5C;&#x7528;&#xFF1A;&#x53EF;&#x4EE5;&#x7528;&#x6765;&#x8BA9;&#x7CFB;&#x7EDF;&#x5B9A;&#x65F6;&#x8C03;&#x7528;&#x67D0;&#x4E2A;&#x6307;&#x4EE4;&#x3002;</strong>
<strong>&#x539F;&#x7406;&#xFF1A;Linux&#x4E0B;&#x7684;&#x4EFB;&#x52A1;&#x8C03;&#x5EA6;&#x5206;&#x4E3A;&#x4E24;&#x7C7B;&#xFF1A;&#x7CFB;&#x7EDF;&#x4EFB;&#x52A1;&#x8C03;&#x5EA6;&#x548C;&#x7528;&#x6237;&#x4EFB;&#x52A1;&#x8C03;&#x5EA6;&#x3002;<code>Linux</code>&#x7CFB;&#x7EDF;&#x4EFB;&#x52A1;&#x662F;&#x7531; <code>cron (crond)</code> &#x8FD9;&#x4E2A;&#x7CFB;&#x7EDF;&#x670D;&#x52A1;&#x6765;&#x63A7;&#x5236;&#x7684;&#xFF0C;&#x8FD9;&#x4E2A;&#x7CFB;&#x7EDF;&#x670D;&#x52A1;&#x662F;&#x9ED8;&#x8BA4;&#x542F;&#x52A8;&#x7684;&#x3002;</strong>
<strong>&#x6CE8;&#x610F;&#xFF1A;<code>crondtab</code>&#x914D;&#x7F6E;&#x4F1A;&#x6BCF;&#x5206;&#x949F;&#x5237;&#x65B0;&#x4E00;&#x6B21;&#x3002;</strong></p>
<p style="text-align:center;"><a href="../../image/linux/crontab_struction.jpg" data-lightbox="3d87ef61-cf52-4ec6-8079-d7c51fdcfcc5" data-title="undefined"><img src="../../image/linux/crontab_struction.jpg" alt="undefined"></a></p>

<h2 id="62-&#x914D;&#x7F6E;"><a name="62-&#x914D;&#x7F6E;" class="anchor-navigation-ex-anchor" href="#62-&#x914D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>6.2. &#x914D;&#x7F6E;</h2>
<p><span style="font-size:24px;font-weight:bold" class="section2">&#x914D;&#x7F6E;&#x6587;&#x4EF6;</span></p>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">cat /etc/crontab</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`cat /etc/crontab`)"></i>
          <span class="terminullOutput"># /etc/crontab: system-wide crontab
# Unlike any other crontab you don&apos;t have to run the `crontab&apos;
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

# crond&#x4EFB;&#x52A1;&#x8FD0;&#x884C;&#x7684;&#x73AF;&#x5883;&#x53D8;&#x91CF;
SHELL=/bin/sh # &#x7CFB;&#x7EDF;&#x8981;&#x4F7F;&#x7528;&#x54EA;&#x4E2A;shell
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # &#x7CFB;&#x7EDF;&#x6267;&#x884C;&#x547D;&#x4EE4;&#x7684;&#x8DEF;&#x5F84;

# &#x5B9A;&#x65F6;&#x547D;&#x4EE4;&#x914D;&#x7F6E;
# m h dom mon dow user  command
17 *    * * *   root    cd / &amp;&amp; run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.monthly )
#</span>
        
    </div>
</div><p></p>
<p><span style="font-size:24px;font-weight:bold" class="section2">&#x914D;&#x7F6E;&#x8BBE;&#x7F6E;</span></p>
<p style="text-align:center;"><a href="../../image/linux/crontab.png" data-lightbox="612ef560-4c6b-4ea7-bf8f-24c189b7cb88" data-title="undefined"><img src="../../image/linux/crontab.png" alt="undefined"></a></p>

<blockquote>
<p>[!tip|style:flat]</p>
<ul>
<li><code>*</code>&#xFF1A;&#x53D6;&#x503C;&#x8303;&#x56F4;&#x5185;&#x7684;&#x6240;&#x6709;&#x503C;</li>
<li><code>/</code>&#xFF1A;&#x4E00;&#x5B9A;&#x65F6;&#x95F4;&#x95F4;&#x9694;&#xFF0C;&#x5982;&#x5206;&#x949F;&#x5B57;&#x6BB5;&#x4E3A;<code>*/10</code>&#xFF0C;&#x8868;&#x793A;&#x6BCF;<code>10</code>&#x5206;&#x949F;&#x6267;&#x884C;<code>1</code>&#x6B21;</li>
<li><code>-</code>&#xFF1A;&#x67D0;&#x4E2A;&#x533A;&#x95F4;&#x8303;&#x56F4;&#xFF0C;&#x5982;<code>a - b</code>&#x8868;&#x793A;<code>[a,b]</code></li>
<li><code>,</code>&#xFF1A;&#x5206;&#x6563;&#x7684;&#x65F6;&#x95F4;&#x5B89;&#x6392;&#xFF0C;&#x5982;<code>1,3,4</code></li>
</ul>
<p>[!tip|style:flat]
<strong>&#x6307;&#x4EE4;&#x914D;&#x7F6E;&#x65F6;&#xFF0C;&#x6700;&#x597D;&#x5199;&#x6210;&#x7EDD;&#x5BF9;&#x8DEF;&#x5F84;&#x3002;</strong></p>
</blockquote>
<p><strong>&#x53C2;&#x8003;&#x535A;&#x5BA2;&#xFF1A;<a href="https://www.linuxprobe.com/how-to-crontab.html" target="_blank">crontab&#x7528;&#x6CD5;&#x4E0E;&#x5B9E;&#x4F8B;</a></strong></p>
<p><span style="font-size:24px;font-weight:bold" class="section2">&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x7F16;&#x8F91;</span></p>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">vim /etc/crontab</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`vim /etc/crontab`)"></i>
          <span class="terminullOutput"></span>
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">crontab -e</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`crontab -e`)"></i>
          <span class="terminullOutput"></span>
        
    </div>
</div><p></p>
<h1 id="7-&#x6302;&#x8F7D;"><a name="7-&#x6302;&#x8F7D;" class="anchor-navigation-ex-anchor" href="#7-&#x6302;&#x8F7D;"><i class="fa fa-link" aria-hidden="true"></i></a>7. &#x6302;&#x8F7D;</h1>
<blockquote>
<p>[!tip]
<strong><code>fs</code>&#x8868;&#x793A;<code>file system</code></strong></p>
</blockquote>
<p></p><div class="terminull">
    <div class="terminullMenu">
      <div class="terminullButtons terminullClose"></div>
      <div class="terminullButtons terminullMinimize"></div>
      <div class="terminullButtons terminullZoom"></div>
    </div>
    <div class="terminullScreen">
        
          <span class="terminullDirectory">triangle@LEARN_FUCK:~</span>$ 
          <span class="terminullCommand">cat /etc/fstab</span>
          
          <i class="fa fa-clone t-copy terminullCopyBtn" onclick="copyCommandTerminull(`cat /etc/fstab`)"></i>
          <span class="terminullOutput"># This file is edited by fstab-sync - see &apos;man fstab-sync&apos; for details

# Device                Mount point        filesystem   parameters  dump fsck

LABEL=/                 /                       ext3    defaults        1 1

LABEL=/boot             /boot                   ext3    defaults        1 2

none                    /dev/pts                devpts  gid=5,mode=620  0 0

none                    /dev/shm                tmpfs   defaults        0 0

none                    /proc                   proc    defaults        0 0

none                    /sys                    sysfs   defaults        0 0

LABEL=SWAP-sda3         swap                    swap    defaults        0 0

/dev/sdb1               /u01                    ext3    defaults        1 2

UUID=18823fc1-2958-49a0-9f1e-e1316bd5c2c5       /u02    ext3    defaults        1 2

/dev/hdc                /media/cdrom1           auto    pamconsole,exec,noauto,managed 0 0

/dev/fd0                /media/floppy           auto    pamconsole,exec,noauto,managed 0 0</span>
        
    </div>
</div><p></p>
<p><strong>&#x5F53;&#x7CFB;&#x7EDF;&#x542F;&#x52A8;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x4F1A;&#x81EA;&#x52A8;&#x5C06;&#x6B64;&#x6587;&#x4EF6;&#x4E2D;&#x6307;&#x5B9A;&#x7684;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x6302;&#x8F7D;&#x5230;&#x6307;&#x5B9A;&#x7684;&#x76EE;&#x5F55;&#x3002;</strong></p>
<ul>
<li><code>Device</code> &#x8981;&#x6302;&#x8F7D;&#x7684;&#x5206;&#x533A;&#x6216;&#x5B58;&#x50A8;&#x8BBE;&#x5907;</li>
<li><code>Mount point</code> &#x6302;&#x8F7D;&#x70B9;</li>
<li><code>filesystem</code> &#x8981;&#x6302;&#x8F7D;&#x8BBE;&#x5907;&#x6216;&#x662F;&#x5206;&#x533A;&#x7684;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7C7B;&#x578B;;<code>auto</code>&#x7C7B;&#x578B;&#x81EA;&#x52A8;&#x641C;&#x7D22;&#xFF0C;&#x7528;&#x4E8E;cd&#xFF0C;DVD</li>
<li><code>parameters</code> &#x6302;&#x8F7D;&#x53C2;&#x6570;</li>
<li><code>dump dump</code> &#xFF08;0&#x8868;&#x793A;&#x4E0D;&#x8FDB;&#x884C;dump&#x5907;&#x4EFD;&#xFF0C;1&#x4EE3;&#x8868;&#x6BCF;&#x5929;&#x8FDB;&#x884C;dump&#x5907;&#x4EFD;&#xFF0C;2&#x4EE3;&#x8868;&#x4E0D;&#x5B9A;&#x65E5;&#x671F;&#x7684;&#x8FDB;&#x884C;dump&#x5907;&#x4EFD;&#xFF09;</li>
<li><code>pass fsck</code>&#x68C0;&#x6D4B;&#x987A;&#x5E8F; &#xFF08;&#x5176;&#x5B9E;&#x662F;&#x4E00;&#x4E2A;&#x68C0;&#x67E5;&#x987A;&#x5E8F;&#xFF0C;0&#x4EE3;&#x8868;&#x4E0D;&#x68C0;&#x67E5;&#xFF0C;1&#x4EE3;&#x8868;&#x7B2C;&#x4E00;&#x4E2A;&#x68C0;&#x67E5;&#xFF0C;2&#x540E;&#x7EED;.&#x4E00;&#x822C;&#x6839;&#x76EE;&#x5F55;&#x662F;1&#xFF0C;&#x6570;&#x5B57;&#x76F8;&#x540C;&#x5219;&#x540C;&#x65F6;&#x68C0;&#x67E5;&#xFF09;</li>
</ul>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../linux.html" class="navigation navigation-prev " aria-label="Previous page: Linux">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="command_withNum.html" class="navigation navigation-next " aria-label="Next page: 二、指令">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"一、原理知识","level":"4.1.1","depth":2,"next":{"title":"二、指令","level":"4.1.2","depth":2,"path":"linux/chapter/command_withNum.md","ref":"linux/chapter/command_withNum.md","articles":[]},"previous":{"title":"Linux","level":"4.1","depth":1,"path":"linux/linux.md","ref":"./linux/linux.md","articles":[{"title":"一、原理知识","level":"4.1.1","depth":2,"path":"linux/chapter/foundation_withNum.md","ref":"linux/chapter/foundation_withNum.md","articles":[]},{"title":"二、指令","level":"4.1.2","depth":2,"path":"linux/chapter/command_withNum.md","ref":"linux/chapter/command_withNum.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","search-pro-fixed","expandable-chapters-small","ancre-navigation","hide-element","code","splitter","insert-logo-link-website","-sharing","sharing-plus","prism","-highlight","flexible-alerts","lightbox","pageview-count","auto-scroll-table","katex-pro","favicon-absolute","sectionx","terminull-light","livereload"],"styles":{"website":"styles/website.css","ebook":"styles/ebook.css","pdf":"styles/pdf.css","mobi":"styles/mobi.css","epub":"styles/epub.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism-tomorrow.css"],"lang":{"flow":"typescript"}},"livereload":{},"splitter":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"auto-scroll-table":{},"code":{"copyButtons":true},"terminull-light":{},"search-pro-fixed":{},"favicon-absolute":{"favicon":"image/ico.png","appleTouchIconPrecomposed152":"image/ico.png","appleTouchIconMore":{},"appleTouchIconPrecomposedMore":{}},"hide-element":{"elements":[".gitbook-link"]},"katex-pro":{},"fontsettings":{"theme":"white","family":"sans","size":2},"sectionx":{"tag":"b"},"lightbox":{"jquery":true,"sameUuid":false},"insert-logo-link-website":{"url":"image/logo.png","link":"https://space.bilibili.com/27206875","target":"_blank","style":"height: 230px"},"pageview-count":{},"ancre-navigation":{"showLevel":true,"associatedWithSummary":true,"mode":"float","printLog":false,"multipleH1":true,"float":{"showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""},"pageTop":{"showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""}},"expandable-chapters-small":{},"flexible-alerts":{"style":"callout","note":{"label":"Note","icon":"fa fa-info-circle","className":"info"},"tip":{"label":"Tip","icon":"fa fa-lightbulb-o","className":"tip"},"warning":{"label":"Warning","icon":"fa fa-exclamation-triangle","className":"warning"},"danger":{"label":"Attention","icon":"fa fa-ban","className":"danger"}},"sharing":{"qq":true,"all":["douban","facebook","google","instapaper","linkedin","twitter","weibo","messenger","qq","qzone","viber","whatsapp"],"douban":false,"facebook":false,"weibo":true,"whatsapp":false,"twitter":false,"pocket":false,"google":true,"qzone":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"海拉尔的三角","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"计算机笔记","links":{"sidebar":{"Github":"https://github.com/spite-triangle"}},"gitbook":"*"},"file":{"path":"linux/chapter/foundation_withNum.md","mtime":"2021-09-14T15:43:13.185Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-09-14T15:43:23.052Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro-fixed/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro-fixed/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-insert-logo-link-website/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lightbox/js/lightbox.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-auto-scroll-table/plugin.js"></script>
        
    
        
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sectionx/sectionx.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-terminull-light/terminull.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

